IObjectAdapter.Replace(Operation, Object) 方法

定义

使用“替换”操作,目标位置的值将替换为新值。 操作对象必须包含指定替换值的“value”成员。

必须存在目标位置才能使操作成功。

例如:

{ “op”: “replace”, “path”: “/a/b/c”, “value”: 42 }

请参阅 RFC 6902 https://tools.ietf.org/html/rfc6902#page-6

public:
 void Replace(Microsoft::AspNetCore::JsonPatch::Operations::Operation ^ operation, System::Object ^ objectToApplyTo);
public void Replace (Microsoft.AspNetCore.JsonPatch.Operations.Operation operation, object objectToApplyTo);
abstract member Replace : Microsoft.AspNetCore.JsonPatch.Operations.Operation * obj -> unit
Public Sub Replace (operation As Operation, objectToApplyTo As Object)

参数

operation
Operation

替换操作。

objectToApplyTo
Object

要对其应用操作的对象。

适用于