1 type derived from ModelStateEntry
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelStateDictionary.cs (1)
828private 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)
22public class ModelStateDictionary : IReadOnlyDictionary<string, ModelStateEntry?> 88public ModelStateEntry Root => _root; 103/// Errors added via modifying <see cref="ModelStateEntry"/> directly do not count towards this limit. 145IEnumerable<string> IReadOnlyDictionary<string, ModelStateEntry?>.Keys => Keys; 153IEnumerable<ModelStateEntry> IReadOnlyDictionary<string, ModelStateEntry?>.Values => Values; 171public ModelStateEntry? this[string key] 177TryGetValue(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> 277TryGetValue(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> 392if (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"/>. 731public bool TryGetValue(string key, [NotNullWhen(true)] out ModelStateEntry? value) 753IEnumerator<KeyValuePair<string, ModelStateEntry?>> 754IEnumerable<KeyValuePair<string, ModelStateEntry?>>.GetEnumerator() => GetEnumerator(); 839public override IReadOnlyList<ModelStateEntry>? Children => ChildNodes; 852public void Copy(ModelStateEntry entry) 925public override ModelStateEntry? GetModelStateForProperty(string propertyName) 972public readonly struct PrefixEnumerable : IEnumerable<KeyValuePair<string, ModelStateEntry>> 994IEnumerator<KeyValuePair<string, ModelStateEntry>> 995IEnumerable<KeyValuePair<string, ModelStateEntry>>.GetEnumerator() => GetEnumerator(); 1003public struct Enumerator : IEnumerator<KeyValuePair<string, ModelStateEntry>> 1029public KeyValuePair<string, ModelStateEntry> Current => 1030new KeyValuePair<string, ModelStateEntry>(_modelStateNode.Key, _modelStateNode); 1185/// An <see cref="IEnumerable"/> for <see cref="ModelStateEntry"/>. 1187public readonly struct ValueEnumerable : IEnumerable<ModelStateEntry> 1203IEnumerator<ModelStateEntry> IEnumerable<ModelStateEntry>.GetEnumerator() => GetEnumerator(); 1209/// An enumerator for <see cref="ModelStateEntry"/>. 1211public struct ValueEnumerator : IEnumerator<ModelStateEntry> 1227public ModelStateEntry Current { get; private set; } 1264public 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"/>. 62public abstract ModelStateEntry? GetModelStateForProperty(string propertyName); 65/// Gets the <see cref="ModelStateEntry"/> values for sub-properties. 71public 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)
425var entry = modelState[string.Empty];
ModelBinding\Validation\ValidationVisitor.cs (1)
178var entry = ModelState[key];
Microsoft.AspNetCore.Mvc.ViewFeatures (19)
DefaultHtmlGenerator.cs (7)
582if (viewContext.ViewData.ModelState.TryGetValue(fullName, out var entry)) 632viewContext.ViewData.ModelState.TryGetValue(fullName, out var entry); 740var tryGetModelStateResult = viewContext.ViewData.ModelState.TryGetValue(fullName, out var entry); 818(!viewData.ModelState.TryGetValue(viewData.TemplateInfo.HtmlFieldPrefix, out var entryForModel) || 847foreach (var modelState in modelStates) 1066if (viewContext.ViewData.ModelState.TryGetValue(key, out var entry) && entry.RawValue != null) 1262if (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)
26ModelStateEntry containingEntry, 44public static IList<ModelStateEntry> GetModelStateList( 50viewData.ModelState.TryGetValue(viewData.TemplateInfo.HtmlFieldPrefix, out var ms); 61var entries = new List<ModelStateEntry>(); 79return Array.Empty<ModelStateEntry>(); 83ModelStateEntry modelStateEntry, 85List<ModelStateEntry> orderedModelStateEntries) 89foreach (var indexEntry in modelStateEntry.Children) 99var propertyModelStateEntry = modelStateEntry.GetModelStateForProperty(propertyMetadata.PropertyName);