1 type derived from ModelStateEntry
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelStateDictionary.cs (1)
828
private sealed class ModelStateNode :
ModelStateEntry
90 references to ModelStateEntry
Microsoft.AspNetCore.Mvc.Abstractions (69)
ModelBinding\ModelBindingContext.cs (1)
76
/// Gets or sets the <see cref="ModelStateDictionary"/> used to capture <see cref="
ModelStateEntry
"/> values
ModelBinding\ModelStateDictionary.cs (54)
22
public class ModelStateDictionary : IReadOnlyDictionary<string,
ModelStateEntry
?>
88
public
ModelStateEntry
Root => _root;
103
/// Errors added via modifying <see cref="
ModelStateEntry
"/> directly do not count towards this limit.
145
IEnumerable<string> IReadOnlyDictionary<string,
ModelStateEntry
?>.Keys => Keys;
153
IEnumerable<
ModelStateEntry
> IReadOnlyDictionary<string,
ModelStateEntry
?>.Values => Values;
171
public
ModelStateEntry
? this[string key]
177
TryGetValue(key, out
var
entry);
190
/// Adds the specified <paramref name="exception"/> to the <see cref="
ModelStateEntry
.Errors"/> instance
201
/// <param name="key">The key of the <see cref="
ModelStateEntry
"/> to add errors to.</param>
230
/// Adds the specified <paramref name="exception"/> to the <see cref="
ModelStateEntry
.Errors"/> instance
235
/// <param name="key">The key of the <see cref="
ModelStateEntry
"/> to add errors to.</param>
249
/// Attempts to add the specified <paramref name="exception"/> to the <see cref="
ModelStateEntry
.Errors"/>
254
/// <param name="key">The key of the <see cref="
ModelStateEntry
"/> to add errors to.</param>
277
TryGetValue(key, out
var
entry);
317
/// Adds the specified <paramref name="errorMessage"/> to the <see cref="
ModelStateEntry
.Errors"/> instance
322
/// <param name="key">The key of the <see cref="
ModelStateEntry
"/> to add errors to.</param>
333
/// Attempts to add the specified <paramref name="errorMessage"/> to the <see cref="
ModelStateEntry
.Errors"/>
338
/// <param name="key">The key of the <see cref="
ModelStateEntry
"/> to add errors to.</param>
392
if (TryGetValue(key, out
var
validationState))
401
/// Marks the <see cref="
ModelStateEntry
.ValidationState"/> for the entry with the specified
404
/// <param name="key">The key of the <see cref="
ModelStateEntry
"/> to mark as valid.</param>
421
/// Marks the <see cref="
ModelStateEntry
.ValidationState"/> for the entry with the specified <paramref name="key"/>
424
/// <param name="key">The key of the <see cref="
ModelStateEntry
"/> to mark as skipped.</param>
463
/// Sets the of <see cref="
ModelStateEntry
.RawValue"/> and <see cref="
ModelStateEntry
.AttemptedValue"/> for
464
/// the <see cref="
ModelStateEntry
"/> with the specified <paramref name="key"/>.
466
/// <param name="key">The key for the <see cref="
ModelStateEntry
"/> entry.</param>
467
/// <param name="rawValue">The raw value for the <see cref="
ModelStateEntry
"/> entry.</param>
483
/// Sets the value for the <see cref="
ModelStateEntry
"/> with the specified <paramref name="key"/>.
485
/// <param name="key">The key for the <see cref="
ModelStateEntry
"/> entry</param>
487
/// A <see cref="ValueProviderResult"/> with data for the <see cref="
ModelStateEntry
"/> entry.
709
/// Removes the <see cref="
ModelStateEntry
"/> with the specified <paramref name="key"/>.
731
public bool TryGetValue(string key, [NotNullWhen(true)] out
ModelStateEntry
? value)
753
IEnumerator<KeyValuePair<string,
ModelStateEntry
?>>
754
IEnumerable<KeyValuePair<string,
ModelStateEntry
?>>.GetEnumerator() => GetEnumerator();
839
public override IReadOnlyList<
ModelStateEntry
>? Children => ChildNodes;
852
public void Copy(
ModelStateEntry
entry)
925
public override
ModelStateEntry
? GetModelStateForProperty(string propertyName)
972
public readonly struct PrefixEnumerable : IEnumerable<KeyValuePair<string,
ModelStateEntry
>>
994
IEnumerator<KeyValuePair<string,
ModelStateEntry
>>
995
IEnumerable<KeyValuePair<string,
ModelStateEntry
>>.GetEnumerator() => GetEnumerator();
1003
public struct Enumerator : IEnumerator<KeyValuePair<string,
ModelStateEntry
>>
1029
public KeyValuePair<string,
ModelStateEntry
> Current =>
1030
new KeyValuePair<string,
ModelStateEntry
>(_modelStateNode.Key, _modelStateNode);
1185
/// An <see cref="IEnumerable"/> for <see cref="
ModelStateEntry
"/>.
1187
public readonly struct ValueEnumerable : IEnumerable<
ModelStateEntry
>
1203
IEnumerator<
ModelStateEntry
> IEnumerable<
ModelStateEntry
>.GetEnumerator() => GetEnumerator();
1209
/// An enumerator for <see cref="
ModelStateEntry
"/>.
1211
public struct ValueEnumerator : IEnumerator<
ModelStateEntry
>
1227
public
ModelStateEntry
Current { get; private set; }
1264
public DictionaryItemDebugView<string,
ModelStateEntry
?>[] Items => _dictionary.Select(pair => new DictionaryItemDebugView<string,
ModelStateEntry
?>(pair)).ToArray();
ModelBinding\ModelStateEntry.cs (6)
44
/// Gets a value that determines if the current instance of <see cref="
ModelStateEntry
"/> is a container node.
51
/// Gets the <see cref="
ModelStateEntry
"/> for a sub-property with the specified
56
/// The <see cref="
ModelStateEntry
"/> if a sub-property was found; otherwise <see langword="null"/>.
62
public abstract
ModelStateEntry
? GetModelStateForProperty(string propertyName);
65
/// Gets the <see cref="
ModelStateEntry
"/> values for sub-properties.
71
public abstract IReadOnlyList<
ModelStateEntry
>? Children { get; }
ModelBinding\ModelValidationState.cs (8)
7
/// The validation state of a <see cref="
ModelStateEntry
"/> instance.
18
/// Validation has not been performed on the <see cref="
ModelStateEntry
"/>.
20
/// For aggregate validity, the validation of a <see cref="
ModelStateEntry
"/> is <see cref="Unvalidated"/>
27
/// Validation was performed on the <see cref="
ModelStateEntry
"/> and was found to be invalid.
29
/// For aggregate validity, the validation of a <see cref="
ModelStateEntry
"/> is <see cref="Invalid"/>
36
/// Validation was performed on the <see cref="
ModelStateEntry
"/>
38
/// For aggregate validity, the validation of a <see cref="
ModelStateEntry
"/> is <see cref="Valid"/>
45
/// Validation was skipped for the <see cref="
ModelStateEntry
"/>.
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\ModelBindingHelper.cs (1)
425
var
entry = modelState[string.Empty];
ModelBinding\Validation\ValidationVisitor.cs (1)
178
var
entry = ModelState[key];
Microsoft.AspNetCore.Mvc.ViewFeatures (19)
DefaultHtmlGenerator.cs (7)
582
if (viewContext.ViewData.ModelState.TryGetValue(fullName, out
var
entry))
632
viewContext.ViewData.ModelState.TryGetValue(fullName, out
var
entry);
740
var tryGetModelStateResult = viewContext.ViewData.ModelState.TryGetValue(fullName, out
var
entry);
818
(!viewData.ModelState.TryGetValue(viewData.TemplateInfo.HtmlFieldPrefix, out
var
entryForModel) ||
847
foreach (
var
modelState in modelStates)
1066
if (viewContext.ViewData.ModelState.TryGetValue(key, out
var
entry) && entry.RawValue != null)
1262
if (viewContext.ViewData.ModelState.TryGetValue(fullName, out
var
entry) && entry.Errors.Count > 0)
ModelStateDictionaryExtensions.cs (3)
16
/// Adds the specified <paramref name="errorMessage"/> to the <see cref="
ModelStateEntry
.Errors"/> instance
38
/// Adds the specified <paramref name="exception"/> to the <see cref="
ModelStateEntry
.Errors"/> instance
64
/// Adds the specified <paramref name="exception"/> to the <see cref="
ModelStateEntry
.Errors"/> instance
ValidationHelpers.cs (9)
26
ModelStateEntry
containingEntry,
44
public static IList<
ModelStateEntry
> GetModelStateList(
50
viewData.ModelState.TryGetValue(viewData.TemplateInfo.HtmlFieldPrefix, out
var
ms);
61
var entries = new List<
ModelStateEntry
>();
79
return Array.Empty<
ModelStateEntry
>();
83
ModelStateEntry
modelStateEntry,
85
List<
ModelStateEntry
> orderedModelStateEntries)
89
foreach (
var
indexEntry in modelStateEntry.Children)
99
var
propertyModelStateEntry = modelStateEntry.GetModelStateForProperty(propertyMetadata.PropertyName);