44 instantiations of ValidationStateEntry
Microsoft.AspNetCore.Mvc.Core (6)
ModelBinding\Binders\CancellationTokenModelBinder.cs (1)
25
bindingContext.ValidationState.Add(model, new
ValidationStateEntry
() { SuppressValidation = true });
ModelBinding\Binders\CollectionModelBinder.cs (1)
171
bindingContext.ValidationState.Add(model, new
ValidationStateEntry
()
ModelBinding\Binders\DictionaryModelBinder.cs (1)
214
bindingContext.ValidationState.Add(model, new
ValidationStateEntry
()
ModelBinding\Binders\FormFileModelBinder.cs (1)
121
bindingContext.ValidationState.Add(value, new
ValidationStateEntry
()
ModelBinding\Binders\KeyedServicesModelBinder.cs (1)
37
bindingContext.ValidationState.Add(model, new
ValidationStateEntry
() { SuppressValidation = true });
ModelBinding\Binders\ServicesModelBinder.cs (1)
31
bindingContext.ValidationState.Add(model, new
ValidationStateEntry
() { SuppressValidation = true });
Microsoft.AspNetCore.Mvc.Core.Test (38)
ModelBinding\Validation\DefaultObjectValidatorTests.cs (38)
34
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
60
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
89
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
116
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter", SuppressValidation = true });
141
{ model, new
ValidationStateEntry
{ SuppressValidation = true } }
166
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
198
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
228
validationState.Add(model, new
ValidationStateEntry
() { Key = string.Empty });
266
validationState.Add(model, new
ValidationStateEntry
() { Key = "person" });
267
validationState.Add(model.Address, new
ValidationStateEntry
()
303
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
335
validationState.Add(model, new
ValidationStateEntry
() { Key = string.Empty });
367
validationState.Add(model, new
ValidationStateEntry
() { Key = string.Empty });
404
{ model, new
ValidationStateEntry
() },
438
{ model, new
ValidationStateEntry
{ Key = "invalidProperties" } },
480
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
527
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
626
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
657
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
693
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
733
validationState.Add(model, new
ValidationStateEntry
() { Key = "user", });
763
validationState.Add(model, new
ValidationStateEntry
() { Key = "parameter" });
794
validationState.Add(model, new
ValidationStateEntry
() { Key = string.Empty });
837
validationState.Add(model, new
ValidationStateEntry
() { Key = string.Empty });
913
validationState.Add(model, new
ValidationStateEntry
()
950
{ model, new
ValidationStateEntry
() },
995
validationState.Add(model, new
ValidationStateEntry
() { Key = "items" });
1036
validationState.Add(model, new
ValidationStateEntry
() { Key = string.Empty });
1142
validationState.Add(model, new
ValidationStateEntry
() { Key = "user", });
1172
validationState.Add(model, new
ValidationStateEntry
() { Key = "userIds", });
1206
{ model, new
ValidationStateEntry
() { Key = "parameter" } }
1234
{ model, new
ValidationStateEntry
{ SuppressValidation = true } }
1275
{ model, new
ValidationStateEntry
() }
1295
{ model, new
ValidationStateEntry
() }
1324
{ model, new
ValidationStateEntry
() }
1367
{ model, new
ValidationStateEntry
() }
1396
{ model, new
ValidationStateEntry
() }
1426
{ model, new
ValidationStateEntry
() }
44 references to ValidationStateEntry
Microsoft.AspNetCore.Mvc.Abstractions (32)
ModelBinding\Validation\ValidationStateDictionary.cs (32)
15
[DebuggerTypeProxy(typeof(DictionaryDebugView<object,
ValidationStateEntry
>))]
17
IDictionary<object,
ValidationStateEntry
>,
18
IReadOnlyDictionary<object,
ValidationStateEntry
>
20
private readonly Dictionary<object,
ValidationStateEntry
> _inner;
27
_inner = new Dictionary<object,
ValidationStateEntry
>(ReferenceEqualityComparer.Instance);
31
public
ValidationStateEntry
? this[object key]
35
TryGetValue(key, out
var
entry);
46
ValidationStateEntry
IDictionary<object,
ValidationStateEntry
>.this[object key]
52
ValidationStateEntry
IReadOnlyDictionary<object,
ValidationStateEntry
>.this[object key] => this[key]!;
58
public bool IsReadOnly => ((IDictionary<object,
ValidationStateEntry
>)_inner).IsReadOnly;
61
public ICollection<object> Keys => ((IDictionary<object,
ValidationStateEntry
>)_inner).Keys;
64
public ICollection<
ValidationStateEntry
> Values => ((IDictionary<object,
ValidationStateEntry
>)_inner).Values;
67
IEnumerable<object> IReadOnlyDictionary<object,
ValidationStateEntry
>.Keys =>
68
((IReadOnlyDictionary<object,
ValidationStateEntry
>)_inner).Keys;
71
IEnumerable<
ValidationStateEntry
> IReadOnlyDictionary<object,
ValidationStateEntry
>.Values =>
72
((IReadOnlyDictionary<object,
ValidationStateEntry
>)_inner).Values;
75
public void Add(KeyValuePair<object,
ValidationStateEntry
> item)
77
((IDictionary<object,
ValidationStateEntry
>)_inner).Add(item);
81
public void Add(object key,
ValidationStateEntry
value)
93
public bool Contains(KeyValuePair<object,
ValidationStateEntry
> item)
95
return ((IDictionary<object,
ValidationStateEntry
>)_inner).Contains(item);
105
public void CopyTo(KeyValuePair<object,
ValidationStateEntry
>[] array, int arrayIndex)
107
((IDictionary<object,
ValidationStateEntry
>)_inner).CopyTo(array, arrayIndex);
111
public IEnumerator<KeyValuePair<object,
ValidationStateEntry
>> GetEnumerator()
113
return ((IDictionary<object,
ValidationStateEntry
>)_inner).GetEnumerator();
117
public bool Remove(KeyValuePair<object,
ValidationStateEntry
> item)
129
public bool TryGetValue(object key, [MaybeNullWhen(false)] out
ValidationStateEntry
value)
137
return ((IDictionary<object,
ValidationStateEntry
>)_inner).GetEnumerator();
Microsoft.AspNetCore.Mvc.Core (3)
ModelBinding\Validation\ValidationVisitor.cs (3)
318
var
entry = GetValidationEntry(model);
478
protected virtual
ValidationStateEntry
? GetValidationEntry(object? model)
485
ValidationState.TryGetValue(model, out
var
entry);
Microsoft.AspNetCore.Mvc.Core.Test (9)
ModelBinding\Binders\DictionaryModelBinderTest.cs (1)
366
var
entry = bindingContext.ValidationState[bindingContext.Result.Model];
ModelBinding\Binders\FormFileModelBinderTest.cs (7)
31
var
entry = bindingContext.ValidationState[bindingContext.Result.Model];
65
var
entry = bindingContext.ValidationState[bindingContext.Result.Model];
105
var
entry = bindingContext.ValidationState[bindingContext.Result.Model];
147
var
entry = bindingContext.ValidationState[bindingContext.Result.Model];
181
var
entry = bindingContext.ValidationState[bindingContext.Result.Model];
217
var
entry = bindingContext.ValidationState[bindingContext.Result.Model];
238
var
entry = bindingContext.ValidationState[bindingContext.Result.Model];
ModelBinding\Binders\ServicesModelBinderTest.cs (1)
27
var
entry = bindingContext.ValidationState[bindingContext.Result.Model];