2 writes to Operations
Microsoft.AspNetCore.JsonPatch (2)
JsonPatchDocumentOfT.cs (2)
34
Operations
= new List<Operation<TModel>>();
41
Operations
= operations ?? throw new ArgumentNullException(nameof(operations));
62 references to Operations
Microsoft.AspNetCore.JsonPatch (29)
JsonPatchDocumentOfT.cs (29)
57
Operations
.Add(new Operation<TModel>(
81
Operations
.Add(new Operation<TModel>(
101
Operations
.Add(new Operation<TModel>(
120
Operations
.Add(new Operation<TModel>("remove", GetPath(path, null), from: null));
136
Operations
.Add(new Operation<TModel>(
154
Operations
.Add(new Operation<TModel>(
173
Operations
.Add(new Operation<TModel>(
195
Operations
.Add(new Operation<TModel>(
215
Operations
.Add(new Operation<TModel>(
235
Operations
.Add(new Operation<TModel>(
257
Operations
.Add(new Operation<TModel>(
277
Operations
.Add(new Operation<TModel>(
300
Operations
.Add(new Operation<TModel>(
324
Operations
.Add(new Operation<TModel>(
348
Operations
.Add(new Operation<TModel>(
374
Operations
.Add(new Operation<TModel>(
398
Operations
.Add(new Operation<TModel>(
420
Operations
.Add(new Operation<TModel>(
442
Operations
.Add(new Operation<TModel>(
466
Operations
.Add(new Operation<TModel>(
490
Operations
.Add(new Operation<TModel>(
516
Operations
.Add(new Operation<TModel>(
540
Operations
.Add(new Operation<TModel>(
562
Operations
.Add(new Operation<TModel>(
602
foreach (var op in
Operations
)
630
foreach (var op in
Operations
)
638
var allOps = new List<Operation>(
Operations
?.Count ?? 0);
640
if (
Operations
!= null)
642
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);