C# Class Microsoft.AspNetCore.JsonPatch.JsonPatchDocument

Inheritance: IJsonPatchDocument
Afficher le fichier Open project: aspnet/JsonPatch Class Usage Examples

Private Properties

Свойство Type Description
IJsonPatchDocument IList

Méthodes publiques

Méthode Description
Add ( string path, object value ) : JsonPatchDocument

Add operation. Will result in, for example, { "op": "add", "path": "/a/b/c", "value": [ "foo", "bar" ] }

ApplyTo ( object objectToApplyTo ) : void

Apply this JsonPatchDocument

ApplyTo ( object objectToApplyTo, Action logErrorAction ) : void

Apply this JsonPatchDocument

ApplyTo ( object objectToApplyTo, IObjectAdapter adapter ) : void

Apply this JsonPatchDocument

Copy ( string from, string path ) : JsonPatchDocument

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

JsonPatchDocument ( ) : System
JsonPatchDocument ( List operations, IContractResolver contractResolver ) : System
Move ( string from, string path ) : JsonPatchDocument

Removes value at specified location and add it to the target location. Will result in, for example: { "op": "move", "from": "/a/b/c", "path": "/a/b/d" }

Remove ( string path ) : JsonPatchDocument

Remove value at target location. Will result in, for example, { "op": "remove", "path": "/a/b/c" }

Replace ( string path, object value ) : JsonPatchDocument

Replace value. Will result in, for example, { "op": "replace", "path": "/a/b/c", "value": 42 }

Private Methods

Méthode Description
IJsonPatchDocument ( ) : IList

Method Details

Add() public méthode

Add operation. Will result in, for example, { "op": "add", "path": "/a/b/c", "value": [ "foo", "bar" ] }
public Add ( string path, object value ) : JsonPatchDocument
path string target location
value object value
Résultat JsonPatchDocument

ApplyTo() public méthode

Apply this JsonPatchDocument
public ApplyTo ( object objectToApplyTo ) : void
objectToApplyTo object Object to apply the JsonPatchDocument to
Résultat void

ApplyTo() public méthode

Apply this JsonPatchDocument
public ApplyTo ( object objectToApplyTo, Action logErrorAction ) : void
objectToApplyTo object Object to apply the JsonPatchDocument to
logErrorAction Action Action to log errors
Résultat void

ApplyTo() public méthode

Apply this JsonPatchDocument
public ApplyTo ( object objectToApplyTo, IObjectAdapter adapter ) : void
objectToApplyTo object Object to apply the JsonPatchDocument to
adapter IObjectAdapter IObjectAdapter instance to use when applying
Résultat void

Copy() public méthode

Copy the value at specified location to the target location. Willr esult in, for example: { "op": "copy", "from": "/a/b/c", "path": "/a/b/e" }
public Copy ( string from, string path ) : JsonPatchDocument
from string source location
path string target location
Résultat JsonPatchDocument

JsonPatchDocument() public méthode

public JsonPatchDocument ( ) : System
Résultat System

JsonPatchDocument() public méthode

public JsonPatchDocument ( List operations, IContractResolver contractResolver ) : System
operations List
contractResolver IContractResolver
Résultat System

Move() public méthode

Removes value at specified location and add it to the target location. Will result in, for example: { "op": "move", "from": "/a/b/c", "path": "/a/b/d" }
public Move ( string from, string path ) : JsonPatchDocument
from string source location
path string target location
Résultat JsonPatchDocument

Remove() public méthode

Remove value at target location. Will result in, for example, { "op": "remove", "path": "/a/b/c" }
public Remove ( string path ) : JsonPatchDocument
path string target location
Résultat JsonPatchDocument

Replace() public méthode

Replace value. Will result in, for example, { "op": "replace", "path": "/a/b/c", "value": 42 }
public Replace ( string path, object value ) : JsonPatchDocument
path string target location
value object value
Résultat JsonPatchDocument