2 writes to Operations
Microsoft.AspNetCore.JsonPatch (2)
JsonPatchDocumentOfT.cs (2)
44
Operations
= [];
51
Operations
= operations ?? throw new ArgumentNullException(nameof(operations));
62 references to Operations
Microsoft.AspNetCore.JsonPatch (29)
JsonPatchDocumentOfT.cs (29)
67
Operations
.Add(new Operation<TModel>(
91
Operations
.Add(new Operation<TModel>(
111
Operations
.Add(new Operation<TModel>(
130
Operations
.Add(new Operation<TModel>("remove", GetPath(path, null), from: null));
146
Operations
.Add(new Operation<TModel>(
164
Operations
.Add(new Operation<TModel>(
183
Operations
.Add(new Operation<TModel>(
205
Operations
.Add(new Operation<TModel>(
225
Operations
.Add(new Operation<TModel>(
245
Operations
.Add(new Operation<TModel>(
267
Operations
.Add(new Operation<TModel>(
287
Operations
.Add(new Operation<TModel>(
310
Operations
.Add(new Operation<TModel>(
334
Operations
.Add(new Operation<TModel>(
358
Operations
.Add(new Operation<TModel>(
384
Operations
.Add(new Operation<TModel>(
408
Operations
.Add(new Operation<TModel>(
430
Operations
.Add(new Operation<TModel>(
452
Operations
.Add(new Operation<TModel>(
476
Operations
.Add(new Operation<TModel>(
500
Operations
.Add(new Operation<TModel>(
526
Operations
.Add(new Operation<TModel>(
550
Operations
.Add(new Operation<TModel>(
572
Operations
.Add(new Operation<TModel>(
612
foreach (var op in
Operations
)
640
foreach (var op in
Operations
)
648
var allOps = new List<Operation>(
Operations
?.Count ?? 0);
650
if (
Operations
!= null)
652
foreach (var op in
Operations
)
Microsoft.AspNetCore.JsonPatch.Tests (15)
JsonPatchDocumentJObjectTest.cs (12)
23
patch.
Operations
.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Emails/-", null, "foo@baz.com"));
39
patch.
Operations
.Add(new Operation<ObjectWithJObject>("test", "/CustomData/Email", null, "foo@baz.com"));
40
patch.
Operations
.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Name", null, "Bar Baz"));
53
patch.
Operations
.Add(new Operation<ObjectWithJObject>("test", "/CustomData/Email", null, "foo@bar.com"));
54
patch.
Operations
.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Name", null, "Bar Baz"));
70
patch.
Operations
.Add(new Operation<ObjectWithJObject>("copy", "/CustomData/UserName", "/CustomData/Email"));
86
patch.
Operations
.Add(new Operation<ObjectWithJObject>("remove", "/CustomData/LastName", null));
102
patch.
Operations
.Add(new Operation<ObjectWithJObject>("move", "/CustomData/LastName", "/CustomData/FirstName"));
119
patch.
Operations
.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Name", null, "Foo"));
135
patch.
Operations
.Add(new Operation<ObjectWithJObject>("add", "/CustomData/Name", null, null));
151
patch.
Operations
.Add(new Operation<ObjectWithJObject>("replace", "/CustomData/Email", null, "foo@baz.com"));
167
patch.
Operations
.Add(new Operation<ObjectWithJObject>("replace", "/CustomData/Email", null, null));
JsonPatchDocumentJsonPropertyAttributeTest.cs (3)
23
var pathToCheck = patchDocument.
Operations
.First().path;
54
var fromPath = patchDocument.
Operations
.First().from;
56
var toPath = patchDocument.
Operations
.First().path;
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (18)
JsonPatchExtensionsTest.cs (4)
18
patchDoc.
Operations
.Add(operation);
36
patchDoc.
Operations
.Add(operation);
53
patch.
Operations
.Add(new Operation<Customer>("replace", "/CustomerName", null, "James"));
78
patch.
Operations
.Add(new Operation<Customer>(op, path, from, value));
NewtonsoftJsonPatchInputFormatterTest.cs (14)
51
Assert.Equal("add", patchDocument.
Operations
[0].op);
52
Assert.Equal("Customer/Name", patchDocument.
Operations
[0].path);
53
Assert.Equal("John", patchDocument.
Operations
[0].value);
91
Assert.Equal("add", patchDocument.
Operations
[0].op);
92
Assert.Equal("Customer/Name", patchDocument.
Operations
[0].path);
93
Assert.Equal("John", patchDocument.
Operations
[0].value);
121
Assert.Equal("add", patchDocument.
Operations
[0].op);
122
Assert.Equal("Customer/Name", patchDocument.
Operations
[0].path);
123
Assert.Equal("John", patchDocument.
Operations
[0].value);
145
Assert.Equal("add", patchDocument.
Operations
[0].op);
146
Assert.Equal("Customer/Name", patchDocument.
Operations
[0].path);
147
Assert.Equal("John", patchDocument.
Operations
[0].value);
148
Assert.Equal("remove", patchDocument.
Operations
[1].op);
149
Assert.Equal("Customer/Name", patchDocument.
Operations
[1].path);