41 instantiations of JsonPatchDocument
Microsoft.AspNetCore.JsonPatch.SystemTextJson (1)
Converters\JsonConverterForJsonPatchDocumentOfT.cs (1)
45return new JsonPatchDocument<T>(ops, options);
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (40)
IntegrationTests\ListIntegrationTest.cs (10)
25var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 44var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 65var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 94var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 116var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 181var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 222var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 244var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 329var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 355var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>();
IntegrationTests\NestedObjectIntegrationTest.cs (13)
27var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObjectWithNullCheck>(); 47var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 69var patchDocument = new JsonPatchDocument<NestedObject>(); 89var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 111var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 133var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 156var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 179var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 207var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 231var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 251var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 274var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 305var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>();
JsonPatchDocumentGetPathTest.cs (7)
16var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 29var patchDocument = new JsonPatchDocument<int[]>(); 42var patchDocument = new JsonPatchDocument<Dictionary<string, int>>(); 55var patchDocument = new JsonPatchDocument<SimpleObject>(); 68var patchDocument = new JsonPatchDocument<SimpleObject>(); 81var patchDocument = new JsonPatchDocument<NestedObjectWithDerivedClass>(); 94var patchDocument = new JsonPatchDocument<SimpleObject>();
JsonPatchDocumentJObjectTest.cs (4)
19var patch = new JsonPatchDocument<ObjectWithJObject>(); 35var patch = new JsonPatchDocument<ObjectWithJObject>(); 49var patch = new JsonPatchDocument<ObjectWithJObject>(); 67var patch = new JsonPatchDocument<ObjectWithJObject>();
JsonPatchDocumentJsonPropertyAttributeTest.cs (2)
16var patchDocument = new JsonPatchDocument<JsonPropertyObject>(); 47var patchDocument = new JsonPatchDocument<JsonPropertyWithNoPropertyName>();
JsonPatchDocumentTest.cs (4)
100var doc = new JsonPatchDocument<Organization>(); 120var patchDocTyped = new JsonPatchDocument<SimpleObject>(); 150var patchDocument = new JsonPatchDocument<SimpleObject>(); 247var document = new JsonPatchDocument<SimpleObject>();
107 references to JsonPatchDocument
Microsoft.AspNetCore.JsonPatch.SystemTextJson (54)
Converters\JsonConverterForJsonPatchDocumentOfT.cs (5)
12internal sealed class JsonConverterForJsonPatchDocumentOfT<T> : JsonConverter<JsonPatchDocument<T>> 18public override JsonPatchDocument<T> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 20if (typeToConvert != typeof(JsonPatchDocument<T>)) 22throw new ArgumentException(Resources.FormatParameterMustMatchType(nameof(typeToConvert), nameof(JsonPatchDocument<T>)), nameof(typeToConvert)); 53public override void Write(Utf8JsonWriter writer, JsonPatchDocument<T> value, JsonSerializerOptions options)
Converters\JsonPatchDocumentConverterFactory.cs (1)
15(typeToConvert.IsGenericType && typeToConvert.GetGenericTypeDefinition() == typeof(JsonPatchDocument<>));
JsonPatchDocumentOfT.cs (48)
53/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 54public JsonPatchDocument<TModel> Add<TProp>(Expression<Func<TModel, TProp>> path, TProp value) 74/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 75public JsonPatchDocument<TModel> Add<TProp>( 97/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 98public JsonPatchDocument<TModel> Add<TProp>(Expression<Func<TModel, IList<TProp>>> path, TProp value) 116/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 117public JsonPatchDocument<TModel> Remove<TProp>(Expression<Func<TModel, TProp>> path) 132/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 133public JsonPatchDocument<TModel> Remove<TProp>(Expression<Func<TModel, IList<TProp>>> path, int position) 150/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 151public JsonPatchDocument<TModel> Remove<TProp>(Expression<Func<TModel, IList<TProp>>> path) 169/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 170public JsonPatchDocument<TModel> Replace<TProp>(Expression<Func<TModel, TProp>> path, TProp value) 190/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 191public JsonPatchDocument<TModel> Replace<TProp>(Expression<Func<TModel, IList<TProp>>> path, 211/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 212public JsonPatchDocument<TModel> Replace<TProp>(Expression<Func<TModel, IList<TProp>>> path, TProp value) 231/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 232public JsonPatchDocument<TModel> Test<TProp>(Expression<Func<TModel, TProp>> path, TProp value) 252/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 253public JsonPatchDocument<TModel> Test<TProp>(Expression<Func<TModel, IList<TProp>>> path, 273/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 274public JsonPatchDocument<TModel> Test<TProp>(Expression<Func<TModel, IList<TProp>>> path, TProp value) 293/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 294public JsonPatchDocument<TModel> Move<TProp>( 316/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 317public JsonPatchDocument<TModel> Move<TProp>( 340/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 341public JsonPatchDocument<TModel> Move<TProp>( 365/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 366public JsonPatchDocument<TModel> Move<TProp>( 390/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 391public JsonPatchDocument<TModel> Move<TProp>( 413/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 414public JsonPatchDocument<TModel> Move<TProp>( 435/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 436public JsonPatchDocument<TModel> Copy<TProp>( 458/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 459public JsonPatchDocument<TModel> Copy<TProp>( 482/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 483public JsonPatchDocument<TModel> Copy<TProp>( 507/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 508public JsonPatchDocument<TModel> Copy<TProp>( 532/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 533public JsonPatchDocument<TModel> Copy<TProp>( 555/// <returns>The <see cref="JsonPatchDocument{TModel}"/> for chaining.</returns> 556public JsonPatchDocument<TModel> Copy<TProp>(
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (53)
IntegrationTests\ListIntegrationTest.cs (10)
25var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 44var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 65var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 94var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 116var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 181var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 222var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 244var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 329var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 355var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>();
IntegrationTests\NestedObjectIntegrationTest.cs (15)
27var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObjectWithNullCheck>(); 47var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 51var deserialized = JsonSerializer.Deserialize<JsonPatchDocument<SimpleObjectWithNestedObject>>(serialized); 69var patchDocument = new JsonPatchDocument<NestedObject>(); 89var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 111var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 133var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 156var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 179var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 207var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 231var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 251var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 274var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 305var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>();
JsonPatchDocumentGetPathTest.cs (7)
16var patchDocument = new JsonPatchDocument<SimpleObjectWithNestedObject>(); 29var patchDocument = new JsonPatchDocument<int[]>(); 42var patchDocument = new JsonPatchDocument<Dictionary<string, int>>(); 55var patchDocument = new JsonPatchDocument<SimpleObject>(); 68var patchDocument = new JsonPatchDocument<SimpleObject>(); 81var patchDocument = new JsonPatchDocument<NestedObjectWithDerivedClass>(); 94var patchDocument = new JsonPatchDocument<SimpleObject>();
JsonPatchDocumentJObjectTest.cs (2)
19var patch = new JsonPatchDocument<ObjectWithJObject>(); 35var patch = new JsonPatchDocument<ObjectWithJObject>();
JsonPatchDocumentJsonPropertyAttributeTest.cs (2)
16var patchDocument = new JsonPatchDocument<JsonPropertyObject>(); 47var patchDocument = new JsonPatchDocument<JsonPropertyWithNoPropertyName>();
JsonPatchDocumentTest.cs (17)
66var deserialized = JsonSerializer.Deserialize<JsonPatchDocument<SimpleObject>>(serialized); 100var doc = new JsonPatchDocument<Organization>(); 120var patchDocTyped = new JsonPatchDocument<SimpleObject>(); 150var patchDocument = new JsonPatchDocument<SimpleObject>(); 161var deserialized = JsonSerializer.Deserialize<JsonPatchDocument<SimpleObject>>(serialized); 164Assert.IsType<JsonPatchDocument<SimpleObject>>(deserialized); 195var deserialized 196= JsonSerializer.Deserialize<JsonPatchDocument<SimpleObject>>(serialized, options); 222var docSuccess = DeserializePatchDocumentWithNamingPolicy(json, JsonNamingPolicy.CamelCase); 223var docFail = DeserializePatchDocumentWithNamingPolicy(json, JsonNamingPolicy.KebabCaseLower); 237private static JsonPatchDocument<SimpleObject> DeserializePatchDocumentWithNamingPolicy(string json, JsonNamingPolicy policy) 241var docSuccess = JsonSerializer.Deserialize<JsonPatchDocument<SimpleObject>>(json, compatibleSerializerOption); 247var document = new JsonPatchDocument<SimpleObject>(); 256return JsonSerializer.Serialize<JsonPatchDocument<SimpleObject>>(document, jsonSerializerOptions);