5 writes to ErrorCount
Microsoft.AspNetCore.Mvc.Abstractions (5)
ModelBinding\ModelStateDictionary.cs (5)
361
ErrorCount
++;
456
ErrorCount
+= source.Value.Errors.Count - target.Errors.Count;
685
ErrorCount
++;
695
ErrorCount
= 0;
722
ErrorCount
-= node.Errors.Count;
281 references to ErrorCount
Microsoft.AspNetCore.Mvc.Abstractions (4)
ModelBinding\ModelStateDictionary.cs (4)
128
public bool HasReachedMaxErrors =>
ErrorCount
>= MaxAllowedErrors;
219
if (
ErrorCount
>= MaxAllowedErrors - 1)
268
if (
ErrorCount
>= MaxAllowedErrors - 1)
349
if (
ErrorCount
>= MaxAllowedErrors - 1)
Microsoft.AspNetCore.Mvc.Abstractions.Test (10)
ModelBinding\ModelStateDictionaryTest.cs (10)
121
Assert.Equal(0, dictionary.
ErrorCount
);
137
Assert.Equal(0, dictionary.
ErrorCount
);
180
Assert.Equal(0, source.
ErrorCount
);
239
Assert.Equal(0, source.
ErrorCount
);
276
Assert.Equal(2, target.
ErrorCount
);
312
Assert.Equal(1, dictionary.
ErrorCount
);
333
Assert.Equal(2, dictionary.
ErrorCount
);
768
Assert.Equal(5, dictionary.
ErrorCount
);
836
Assert.Equal(3, dictionary.
ErrorCount
);
868
Assert.Equal(4, dictionary.
ErrorCount
);
Microsoft.AspNetCore.Mvc.Core.Test (10)
ModelBinding\Binders\ArrayModelBinderTest.cs (2)
83
Assert.Equal(expectedErrorCount, bindingContext.ModelState.
ErrorCount
);
162
Assert.Equal(0, bindingContext.ModelState.
ErrorCount
);
ModelBinding\Binders\CollectionModelBinderTest.cs (3)
269
Assert.Equal(0, bindingContext.ModelState.
ErrorCount
);
344
Assert.Equal(0, bindingContext.ModelState.
ErrorCount
);
418
Assert.Equal(0, bindingContext.ModelState.
ErrorCount
);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (1)
327
Assert.Equal(expectedErrorCount, bindingContext.ModelState.
ErrorCount
);
ModelBinding\Binders\DictionaryModelBinderTest.cs (3)
454
Assert.Equal(expectedErrorCount, bindingContext.ModelState.
ErrorCount
);
538
Assert.Equal(expectedErrorCount, bindingContext.ModelState.
ErrorCount
);
582
Assert.Equal(0, bindingContext.ModelState.
ErrorCount
);
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (1)
81
Assert.Equal(0, bindingContext.ModelState.
ErrorCount
);
Microsoft.AspNetCore.Mvc.IntegrationTests (255)
ArrayModelBinderIntegrationTest.cs (8)
41
Assert.Equal(0, modelState.
ErrorCount
);
85
Assert.Equal(0, modelState.
ErrorCount
);
125
Assert.Equal(0, modelState.
ErrorCount
);
163
Assert.Equal(0, modelState.
ErrorCount
);
201
Assert.Equal(0, modelState.
ErrorCount
);
246
Assert.Equal(0, modelState.
ErrorCount
);
287
Assert.Equal(0, modelState.
ErrorCount
);
325
Assert.Equal(0, modelState.
ErrorCount
);
BodyValidationIntegrationTests.cs (1)
585
Assert.Equal(1, modelState.
ErrorCount
);
CollectionModelBinderIntegrationTest.cs (18)
47
Assert.Equal(0, modelState.
ErrorCount
);
95
Assert.Equal(0, modelState.
ErrorCount
);
131
Assert.Equal(0, modelState.
ErrorCount
);
161
Assert.Equal(0, modelState.
ErrorCount
);
204
Assert.Equal(0, modelState.
ErrorCount
);
244
Assert.Equal(0, modelState.
ErrorCount
);
274
Assert.Equal(0, modelState.
ErrorCount
);
317
Assert.Equal(2, modelState.
ErrorCount
);
376
Assert.Equal(2, modelState.
ErrorCount
);
427
Assert.Equal(2, modelState.
ErrorCount
);
477
Assert.Equal(0, modelState.
ErrorCount
);
522
Assert.Equal(2, modelState.
ErrorCount
);
568
Assert.Equal(0, modelState.
ErrorCount
);
618
Assert.Equal(0, modelState.
ErrorCount
);
964
Assert.Equal(0, modelState.
ErrorCount
);
1029
Assert.Equal(0, modelState.
ErrorCount
);
1152
Assert.Equal(0, modelState.
ErrorCount
);
1201
Assert.Equal(0, modelState.
ErrorCount
);
ComplexRecordIntegrationTest.cs (62)
73
Assert.Equal(0, modelState.
ErrorCount
);
123
Assert.Equal(0, modelState.
ErrorCount
);
174
Assert.Equal(0, modelState.
ErrorCount
);
228
Assert.Equal(0, modelState.
ErrorCount
);
277
Assert.Equal(0, modelState.
ErrorCount
);
325
Assert.Equal(0, modelState.
ErrorCount
);
374
Assert.Equal(0, modelState.
ErrorCount
);
426
Assert.Equal(0, modelState.
ErrorCount
);
478
Assert.Equal(0, modelState.
ErrorCount
);
531
Assert.Equal(0, modelState.
ErrorCount
);
584
Assert.Equal(0, modelState.
ErrorCount
);
637
Assert.Equal(0, modelState.
ErrorCount
);
695
Assert.Equal(0, modelState.
ErrorCount
);
749
Assert.Equal(0, modelState.
ErrorCount
);
798
Assert.Equal(0, modelState.
ErrorCount
);
853
Assert.Equal(0, modelState.
ErrorCount
);
908
Assert.Equal(0, modelState.
ErrorCount
);
955
Assert.Equal(0, modelState.
ErrorCount
);
1001
Assert.Equal(0, modelState.
ErrorCount
);
1056
Assert.Equal(0, modelState.
ErrorCount
);
1111
Assert.Equal(0, modelState.
ErrorCount
);
1158
Assert.Equal(0, modelState.
ErrorCount
);
1204
Assert.Equal(0, modelState.
ErrorCount
);
1259
Assert.Equal(0, modelState.
ErrorCount
);
1314
Assert.Equal(0, modelState.
ErrorCount
);
1361
Assert.Equal(0, modelState.
ErrorCount
);
1450
Assert.Equal(0, modelState.
ErrorCount
);
1557
Assert.Equal(0, modelState.
ErrorCount
);
1664
Assert.Equal(0, modelState.
ErrorCount
);
1738
Assert.Equal(0, modelState.
ErrorCount
);
1793
Assert.Equal(0, modelState.
ErrorCount
);
1869
Assert.Equal(0, modelState.
ErrorCount
);
1945
Assert.Equal(0, modelState.
ErrorCount
);
1988
Assert.Equal(1, modelState.
ErrorCount
);
2044
Assert.Equal(1, modelState.
ErrorCount
);
2098
Assert.Equal(1, modelState.
ErrorCount
);
2152
Assert.Equal(1, modelState.
ErrorCount
);
2210
Assert.Equal(1, modelState.
ErrorCount
);
2264
Assert.Equal(1, modelState.
ErrorCount
);
2316
Assert.Equal(1, modelState.
ErrorCount
);
2364
Assert.Equal(0, modelState.
ErrorCount
);
2412
Assert.Equal(1, modelState.
ErrorCount
);
2464
Assert.Equal(1, modelState.
ErrorCount
);
2511
Assert.Equal(0, modelState.
ErrorCount
);
2562
Assert.Equal(1, modelState.
ErrorCount
);
2623
Assert.Equal(1, modelState.
ErrorCount
);
2943
Assert.Equal(0, modelState.
ErrorCount
);
3357
Assert.Equal(0, modelState.
ErrorCount
);
3477
Assert.Equal(0, modelState.
ErrorCount
);
3520
Assert.Equal(0, modelState.
ErrorCount
);
3563
Assert.Equal(0, modelState.
ErrorCount
);
3606
Assert.Equal(0, modelState.
ErrorCount
);
3610
Assert.Equal(0, modelState.
ErrorCount
);
3657
Assert.Equal(0, modelState.
ErrorCount
);
3703
Assert.Equal(0, modelState.
ErrorCount
);
3798
Assert.Equal(0, modelState.
ErrorCount
);
3885
Assert.Equal(0, modelState.
ErrorCount
);
3969
Assert.Equal(0, modelState.
ErrorCount
);
4059
Assert.Equal(0, modelState.
ErrorCount
);
4102
Assert.Equal(0, modelState.
ErrorCount
);
4147
Assert.Equal(0, modelState.
ErrorCount
);
4192
Assert.Equal(1, modelState.
ErrorCount
);
ComplexTypeIntegrationTestBase.cs (49)
110
Assert.Equal(0, modelState.
ErrorCount
);
160
Assert.Equal(0, modelState.
ErrorCount
);
211
Assert.Equal(0, modelState.
ErrorCount
);
260
Assert.Equal(0, modelState.
ErrorCount
);
308
Assert.Equal(0, modelState.
ErrorCount
);
367
Assert.Equal(0, modelState.
ErrorCount
);
419
Assert.Equal(0, modelState.
ErrorCount
);
471
Assert.Equal(0, modelState.
ErrorCount
);
534
Assert.Equal(0, modelState.
ErrorCount
);
587
Assert.Equal(0, modelState.
ErrorCount
);
640
Assert.Equal(0, modelState.
ErrorCount
);
698
Assert.Equal(0, modelState.
ErrorCount
);
752
Assert.Equal(0, modelState.
ErrorCount
);
806
Assert.Equal(0, modelState.
ErrorCount
);
861
Assert.Equal(0, modelState.
ErrorCount
);
916
Assert.Equal(0, modelState.
ErrorCount
);
963
Assert.Equal(0, modelState.
ErrorCount
);
1014
Assert.Equal(0, modelState.
ErrorCount
);
1069
Assert.Equal(0, modelState.
ErrorCount
);
1124
Assert.Equal(0, modelState.
ErrorCount
);
1171
Assert.Equal(0, modelState.
ErrorCount
);
1222
Assert.Equal(0, modelState.
ErrorCount
);
1277
Assert.Equal(0, modelState.
ErrorCount
);
1332
Assert.Equal(0, modelState.
ErrorCount
);
1379
Assert.Equal(0, modelState.
ErrorCount
);
1486
Assert.Equal(0, modelState.
ErrorCount
);
1593
Assert.Equal(0, modelState.
ErrorCount
);
1700
Assert.Equal(0, modelState.
ErrorCount
);
1779
Assert.Equal(0, modelState.
ErrorCount
);
1834
Assert.Equal(0, modelState.
ErrorCount
);
1888
Assert.Equal(1, modelState.
ErrorCount
);
1937
Assert.Equal(1, modelState.
ErrorCount
);
2009
Assert.Equal(0, modelState.
ErrorCount
);
2092
Assert.Equal(0, modelState.
ErrorCount
);
2142
Assert.Equal(1, modelState.
ErrorCount
);
2197
Assert.Equal(1, modelState.
ErrorCount
);
2260
Assert.Equal(1, modelState.
ErrorCount
);
2314
Assert.Equal(1, modelState.
ErrorCount
);
2372
Assert.Equal(1, modelState.
ErrorCount
);
2430
Assert.Equal(1, modelState.
ErrorCount
);
2482
Assert.Equal(1, modelState.
ErrorCount
);
2530
Assert.Equal(0, modelState.
ErrorCount
);
2582
Assert.Equal(1, modelState.
ErrorCount
);
2634
Assert.Equal(1, modelState.
ErrorCount
);
2681
Assert.Equal(0, modelState.
ErrorCount
);
2735
Assert.Equal(1, modelState.
ErrorCount
);
2796
Assert.Equal(1, modelState.
ErrorCount
);
3147
Assert.Equal(0, modelState.
ErrorCount
);
3602
Assert.Equal(0, modelState.
ErrorCount
);
DictionaryModelBinderIntegrationTest.cs (27)
45
Assert.Equal(0, modelState.
ErrorCount
);
84
Assert.Equal(0, modelState.
ErrorCount
);
124
Assert.Equal(0, modelState.
ErrorCount
);
176
Assert.Equal(0, modelState.
ErrorCount
);
213
Assert.Equal(0, modelState.
ErrorCount
);
425
Assert.Equal(0, modelState.
ErrorCount
);
459
Assert.Equal(0, modelState.
ErrorCount
);
530
Assert.Equal(0, modelState.
ErrorCount
);
568
Assert.Equal(0, modelState.
ErrorCount
);
606
Assert.Equal(0, modelState.
ErrorCount
);
641
Assert.Equal(0, modelState.
ErrorCount
);
676
Assert.Equal(0, modelState.
ErrorCount
);
728
Assert.Equal(0, modelState.
ErrorCount
);
767
Assert.Equal(0, modelState.
ErrorCount
);
847
Assert.Equal(0, modelState.
ErrorCount
);
881
Assert.Equal(0, modelState.
ErrorCount
);
931
Assert.Equal(0, modelState.
ErrorCount
);
965
Assert.Equal(0, modelState.
ErrorCount
);
999
Assert.Equal(0, modelState.
ErrorCount
);
1038
Assert.Equal(0, modelState.
ErrorCount
);
1077
Assert.Equal(0, modelState.
ErrorCount
);
1193
Assert.Equal(0, modelState.
ErrorCount
);
1271
Assert.Equal(0, modelState.
ErrorCount
);
1351
Assert.Equal(2, modelState.
ErrorCount
);
1385
Assert.Equal(1, modelState.
ErrorCount
);
1423
Assert.Equal(1, modelState.
ErrorCount
);
1504
Assert.Equal(2, modelState.
ErrorCount
);
GenericModelBinderIntegrationTest.cs (13)
49
Assert.Equal(0, modelState.
ErrorCount
);
87
Assert.Equal(0, modelState.
ErrorCount
);
218
Assert.Equal(0, modelState.
ErrorCount
);
252
Assert.Equal(0, modelState.
ErrorCount
);
289
Assert.Equal(0, modelState.
ErrorCount
);
334
Assert.Equal(0, modelState.
ErrorCount
);
377
Assert.Equal(0, modelState.
ErrorCount
);
413
Assert.Equal(0, modelState.
ErrorCount
);
457
Assert.Equal(0, modelState.
ErrorCount
);
500
Assert.Equal(0, modelState.
ErrorCount
);
537
Assert.Equal(0, modelState.
ErrorCount
);
585
Assert.Equal(0, modelState.
ErrorCount
);
632
Assert.Equal(0, modelState.
ErrorCount
);
KeyValuePairModelBinderIntegrationTest.cs (13)
41
Assert.Equal(0, modelState.
ErrorCount
);
77
Assert.Equal(1, modelState.
ErrorCount
);
127
Assert.Equal(1, modelState.
ErrorCount
);
164
Assert.Equal(1, modelState.
ErrorCount
);
214
Assert.Equal(1, modelState.
ErrorCount
);
259
Assert.Equal(0, modelState.
ErrorCount
);
299
Assert.Equal(0, modelState.
ErrorCount
);
337
Assert.Equal(1, modelState.
ErrorCount
);
378
Assert.Equal(0, modelState.
ErrorCount
);
423
Assert.Equal(0, modelState.
ErrorCount
);
464
Assert.Equal(0, modelState.
ErrorCount
);
502
Assert.Equal(2, modelState.
ErrorCount
);
540
Assert.Equal(0, modelState.
ErrorCount
);
ModelPrefixSelectionIntegrationTest.cs (5)
56
Assert.Equal(0, modelState.
ErrorCount
);
105
Assert.Equal(0, modelState.
ErrorCount
);
144
Assert.Equal(0, modelState.
ErrorCount
);
193
Assert.Equal(0, modelState.
ErrorCount
);
239
Assert.Equal(0, modelState.
ErrorCount
);
SimpleTypeModelBinderIntegrationTest.cs (2)
394
Assert.Equal(1, modelState.
ErrorCount
);
454
Assert.Equal(1, modelState.
ErrorCount
);
ValidationIntegrationTests.cs (29)
191
Assert.Equal(0, modelState.
ErrorCount
);
228
Assert.Equal(1, modelState.
ErrorCount
);
280
Assert.Equal(0, modelState.
ErrorCount
);
317
Assert.Equal(1, modelState.
ErrorCount
);
371
Assert.Equal(0, modelState.
ErrorCount
);
411
Assert.Equal(1, modelState.
ErrorCount
);
463
Assert.Equal(0, modelState.
ErrorCount
);
501
Assert.Equal(1, modelState.
ErrorCount
);
549
Assert.Equal(0, modelState.
ErrorCount
);
589
Assert.Equal(1, modelState.
ErrorCount
);
643
Assert.Equal(0, modelState.
ErrorCount
);
667
Assert.Equal(1, modelState.
ErrorCount
);
707
Assert.Equal(0, modelState.
ErrorCount
);
744
Assert.Equal(1, modelState.
ErrorCount
);
795
Assert.Equal(0, modelState.
ErrorCount
);
832
Assert.Equal(1, modelState.
ErrorCount
);
872
Assert.Equal(0, modelState.
ErrorCount
);
930
Assert.Equal(0, modelState.
ErrorCount
);
967
Assert.Equal(1, modelState.
ErrorCount
);
1037
Assert.Equal(0, modelState.
ErrorCount
);
1074
Assert.Equal(1, modelState.
ErrorCount
);
1125
Assert.Equal(0, modelState.
ErrorCount
);
1162
Assert.Equal(1, modelState.
ErrorCount
);
1202
Assert.Equal(0, modelState.
ErrorCount
);
1240
Assert.Equal(1, modelState.
ErrorCount
);
1280
Assert.Equal(1, modelState.
ErrorCount
);
1372
Assert.Equal(1, modelState.
ErrorCount
);
1421
Assert.Equal(1, modelState.
ErrorCount
);
1752
Assert.Equal(0, modelState.
ErrorCount
);
ValidationWithRecordIntegrationTests.cs (28)
179
Assert.Equal(0, modelState.
ErrorCount
);
216
Assert.Equal(1, modelState.
ErrorCount
);
261
Assert.Equal(0, modelState.
ErrorCount
);
298
Assert.Equal(1, modelState.
ErrorCount
);
343
Assert.Equal(0, modelState.
ErrorCount
);
383
Assert.Equal(1, modelState.
ErrorCount
);
428
Assert.Equal(0, modelState.
ErrorCount
);
466
Assert.Equal(1, modelState.
ErrorCount
);
508
Assert.Equal(0, modelState.
ErrorCount
);
548
Assert.Equal(1, modelState.
ErrorCount
);
590
Assert.Equal(0, modelState.
ErrorCount
);
627
Assert.Equal(1, modelState.
ErrorCount
);
671
Assert.Equal(0, modelState.
ErrorCount
);
708
Assert.Equal(1, modelState.
ErrorCount
);
748
Assert.Equal(0, modelState.
ErrorCount
);
799
Assert.Equal(0, modelState.
ErrorCount
);
836
Assert.Equal(1, modelState.
ErrorCount
);
899
Assert.Equal(0, modelState.
ErrorCount
);
936
Assert.Equal(1, modelState.
ErrorCount
);
983
Assert.Equal(0, modelState.
ErrorCount
);
1020
Assert.Equal(1, modelState.
ErrorCount
);
1060
Assert.Equal(0, modelState.
ErrorCount
);
1092
Assert.Equal(1, modelState.
ErrorCount
);
1132
Assert.Equal(1, modelState.
ErrorCount
);
1216
Assert.Equal(1, modelState.
ErrorCount
);
1265
Assert.Equal(1, modelState.
ErrorCount
);
1555
Assert.Equal(0, modelState.
ErrorCount
);
2444
Assert.Equal(1, modelState.
ErrorCount
);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
JsonPatchExtensionsTest.cs (2)
61
Assert.Equal(0, modelState.
ErrorCount
);
86
Assert.Equal(1, modelState.
ErrorCount
);