Updates per PR feedback
This commit is contained in:
parent
4d92d76b64
commit
146427fa5a
|
|
@ -15,6 +15,16 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public virtual IAdapter Create(object target, IContractResolver contractResolver)
|
public virtual IAdapter Create(object target, IContractResolver contractResolver)
|
||||||
{
|
{
|
||||||
|
if (target == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(target));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (contractResolver == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(contractResolver));
|
||||||
|
}
|
||||||
|
|
||||||
var jsonContract = contractResolver.ResolveContract(target.GetType());
|
var jsonContract = contractResolver.ResolveContract(target.GetType());
|
||||||
|
|
||||||
if (target is IList)
|
if (target is IList)
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the <see cref="IAdapterFactory"/>
|
/// Gets or sets the <see cref="IAdapterFactory"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IAdapterFactory AdapterFactory { get; set; }
|
public IAdapterFactory AdapterFactory { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Action for logging <see cref="JsonPatchError"/>.
|
/// Action for logging <see cref="JsonPatchError"/>.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue