Share via


JsonPatchDocument<TModel>.Copy Method

Definition

Overloads

Name Description
Copy<TProp>(Expression<Func<TModel,TProp>>, Expression<Func<TModel,IList<TProp>>>, Int32)

Copy from a property to a location in a list

Copy<TProp>(Expression<Func<TModel,IList<TProp>>>, Int32, Expression<Func<TModel,TProp>>)

Copy from a position in a list to a new location

Copy<TProp>(Expression<Func<TModel,IList<TProp>>>, Int32, Expression<Func<TModel,IList<TProp>>>, Int32)

Copy from a position in a list to a new location in a list

Copy<TProp>(Expression<Func<TModel,TProp>>, Expression<Func<TModel,TProp>>)

Copy the value at specified location to the target location. Will result in, for example: { "op": "copy", "from": "/a/b/c", "path": "/a/b/e" }

Copy<TProp>(Expression<Func<TModel,TProp>>, Expression<Func<TModel,IList<TProp>>>)

Copy to the end of a list

Copy<TProp>(Expression<Func<TModel,IList<TProp>>>, Int32, Expression<Func<TModel,IList<TProp>>>)

Copy from a position in a list to the end of another list

Copy<TProp>(Expression<Func<TModel,TProp>>, Expression<Func<TModel,IList<TProp>>>, Int32)

Source:
JsonPatchDocumentOfT.cs

Copy from a property to a location in a list

public Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<TModel> Copy<TProp>(System.Linq.Expressions.Expression<Func<TModel,TProp>> from, System.Linq.Expressions.Expression<Func<TModel,System.Collections.Generic.IList<TProp>>> path, int positionTo);
member this.Copy : System.Linq.Expressions.Expression<Func<'Model, 'Prop>> * System.Linq.Expressions.Expression<Func<'Model, System.Collections.Generic.IList<'Prop>>> * int -> Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<'Model (requires 'Model : null)>
Public Function Copy(Of TProp) (from As Expression(Of Func(Of TModel, TProp)), path As Expression(Of Func(Of TModel, IList(Of TProp))), positionTo As Integer) As JsonPatchDocument(Of TModel)

Type Parameters

TProp

Parameters

from
Expression<Func<TModel,TProp>>

source location

path
Expression<Func<TModel,IList<TProp>>>

target location

positionTo
Int32

position

Returns

The JsonPatchDocument<TModel> for chaining.

Applies to

Copy<TProp>(Expression<Func<TModel,IList<TProp>>>, Int32, Expression<Func<TModel,TProp>>)

Source:
JsonPatchDocumentOfT.cs

Copy from a position in a list to a new location

public Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<TModel> Copy<TProp>(System.Linq.Expressions.Expression<Func<TModel,System.Collections.Generic.IList<TProp>>> from, int positionFrom, System.Linq.Expressions.Expression<Func<TModel,TProp>> path);
member this.Copy : System.Linq.Expressions.Expression<Func<'Model, System.Collections.Generic.IList<'Prop>>> * int * System.Linq.Expressions.Expression<Func<'Model, 'Prop>> -> Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<'Model (requires 'Model : null)>
Public Function Copy(Of TProp) (from As Expression(Of Func(Of TModel, IList(Of TProp))), positionFrom As Integer, path As Expression(Of Func(Of TModel, TProp))) As JsonPatchDocument(Of TModel)

Type Parameters

TProp

Parameters

from
Expression<Func<TModel,IList<TProp>>>

source location

positionFrom
Int32

position

path
Expression<Func<TModel,TProp>>

target location

Returns

The JsonPatchDocument<TModel> for chaining.

Applies to

Copy<TProp>(Expression<Func<TModel,IList<TProp>>>, Int32, Expression<Func<TModel,IList<TProp>>>, Int32)

Source:
JsonPatchDocumentOfT.cs

Copy from a position in a list to a new location in a list

public Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<TModel> Copy<TProp>(System.Linq.Expressions.Expression<Func<TModel,System.Collections.Generic.IList<TProp>>> from, int positionFrom, System.Linq.Expressions.Expression<Func<TModel,System.Collections.Generic.IList<TProp>>> path, int positionTo);
member this.Copy : System.Linq.Expressions.Expression<Func<'Model, System.Collections.Generic.IList<'Prop>>> * int * System.Linq.Expressions.Expression<Func<'Model, System.Collections.Generic.IList<'Prop>>> * int -> Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<'Model (requires 'Model : null)>
Public Function Copy(Of TProp) (from As Expression(Of Func(Of TModel, IList(Of TProp))), positionFrom As Integer, path As Expression(Of Func(Of TModel, IList(Of TProp))), positionTo As Integer) As JsonPatchDocument(Of TModel)

Type Parameters

TProp

Parameters

from
Expression<Func<TModel,IList<TProp>>>

source location

positionFrom
Int32

position (source)

path
Expression<Func<TModel,IList<TProp>>>

target location

positionTo
Int32

position (target)

Returns

The JsonPatchDocument<TModel> for chaining.

Applies to

Copy<TProp>(Expression<Func<TModel,TProp>>, Expression<Func<TModel,TProp>>)

Source:
JsonPatchDocumentOfT.cs

Copy the value at specified location to the target location. Will result in, for example: { "op": "copy", "from": "/a/b/c", "path": "/a/b/e" }

public Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<TModel> Copy<TProp>(System.Linq.Expressions.Expression<Func<TModel,TProp>> from, System.Linq.Expressions.Expression<Func<TModel,TProp>> path);
member this.Copy : System.Linq.Expressions.Expression<Func<'Model, 'Prop>> * System.Linq.Expressions.Expression<Func<'Model, 'Prop>> -> Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<'Model (requires 'Model : null)>
Public Function Copy(Of TProp) (from As Expression(Of Func(Of TModel, TProp)), path As Expression(Of Func(Of TModel, TProp))) As JsonPatchDocument(Of TModel)

Type Parameters

TProp

Parameters

from
Expression<Func<TModel,TProp>>

source location

path
Expression<Func<TModel,TProp>>

target location

Returns

The JsonPatchDocument<TModel> for chaining.

Applies to

Copy<TProp>(Expression<Func<TModel,TProp>>, Expression<Func<TModel,IList<TProp>>>)

Source:
JsonPatchDocumentOfT.cs

Copy to the end of a list

public Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<TModel> Copy<TProp>(System.Linq.Expressions.Expression<Func<TModel,TProp>> from, System.Linq.Expressions.Expression<Func<TModel,System.Collections.Generic.IList<TProp>>> path);
member this.Copy : System.Linq.Expressions.Expression<Func<'Model, 'Prop>> * System.Linq.Expressions.Expression<Func<'Model, System.Collections.Generic.IList<'Prop>>> -> Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<'Model (requires 'Model : null)>
Public Function Copy(Of TProp) (from As Expression(Of Func(Of TModel, TProp)), path As Expression(Of Func(Of TModel, IList(Of TProp)))) As JsonPatchDocument(Of TModel)

Type Parameters

TProp

Parameters

from
Expression<Func<TModel,TProp>>

source location

path
Expression<Func<TModel,IList<TProp>>>

target location

Returns

The JsonPatchDocument<TModel> for chaining.

Applies to

Copy<TProp>(Expression<Func<TModel,IList<TProp>>>, Int32, Expression<Func<TModel,IList<TProp>>>)

Source:
JsonPatchDocumentOfT.cs

Copy from a position in a list to the end of another list

public Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<TModel> Copy<TProp>(System.Linq.Expressions.Expression<Func<TModel,System.Collections.Generic.IList<TProp>>> from, int positionFrom, System.Linq.Expressions.Expression<Func<TModel,System.Collections.Generic.IList<TProp>>> path);
member this.Copy : System.Linq.Expressions.Expression<Func<'Model, System.Collections.Generic.IList<'Prop>>> * int * System.Linq.Expressions.Expression<Func<'Model, System.Collections.Generic.IList<'Prop>>> -> Microsoft.AspNetCore.JsonPatch.SystemTextJson.JsonPatchDocument<'Model (requires 'Model : null)>
Public Function Copy(Of TProp) (from As Expression(Of Func(Of TModel, IList(Of TProp))), positionFrom As Integer, path As Expression(Of Func(Of TModel, IList(Of TProp)))) As JsonPatchDocument(Of TModel)

Type Parameters

TProp

Parameters

from
Expression<Func<TModel,IList<TProp>>>

source location

positionFrom
Int32

position

path
Expression<Func<TModel,IList<TProp>>>

target location

Returns

The JsonPatchDocument<TModel> for chaining.

Applies to