JsonPatchDocument<TModel>.Replace 方法

定义

重载

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

替换值。 将生成 ,例如{ “op”: “replace”, “path”: “/a/b/c”, “value”: 42 }

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

替换列表末尾的值

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

替换列表中给定位置的值

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

Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs

替换值。 将生成 ,例如{ “op”: “replace”, “path”: “/a/b/c”, “value”: 42 }

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

类型参数

TProp

参数

path
Expression<Func<TModel,TProp>>

目标位置

value
TProp

value

返回

用于链接的 JsonPatchDocument<TModel>

适用于

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

Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs

替换列表末尾的值

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

类型参数

TProp

Value Type — 值类型

参数

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

目标位置

value
TProp

value

返回

用于链接的 JsonPatchDocument<TModel>

适用于

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

Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs
Source:
JsonPatchDocumentOfT.cs

替换列表中给定位置的值

public:
generic <typename TProp>
 Microsoft::AspNetCore::JsonPatch::JsonPatchDocument<TModel> ^ Replace(System::Linq::Expressions::Expression<Func<TModel, System::Collections::Generic::IList<TProp> ^> ^> ^ path, TProp value, int position);
public Microsoft.AspNetCore.JsonPatch.JsonPatchDocument<TModel> Replace<TProp> (System.Linq.Expressions.Expression<Func<TModel,System.Collections.Generic.IList<TProp>>> path, TProp value, int position);
member this.Replace : System.Linq.Expressions.Expression<Func<'Model, System.Collections.Generic.IList<'Prop>>> * 'Prop * int -> Microsoft.AspNetCore.JsonPatch.JsonPatchDocument<'Model (requires 'Model : null)>
Public Function Replace(Of TProp) (path As Expression(Of Func(Of TModel, IList(Of TProp))), value As TProp, position As Integer) As JsonPatchDocument(Of TModel)

类型参数

TProp

Value Type — 值类型

参数

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

目标位置

value
TProp

value

position
Int32

position

返回

用于链接的 JsonPatchDocument<TModel>

适用于