7 instantiations of FieldIdentifier
Aspire.Dashboard (1)
Components\Dialogs\InteractionsInputDialog.razor.cs (1)
173return new FieldIdentifier(inputModel, fieldName);
Microsoft.AspNetCore.Components.Forms (4)
EditContext.cs (1)
70=> new FieldIdentifier(Model, fieldName);
EditContextDataAnnotationsExtensions.cs (2)
194_messages.Add(new FieldIdentifier(_editContext.Model, fieldName: string.Empty), validationResult.ErrorMessage!); 247var fieldIdentifier = new FieldIdentifier(errorContext.Container ?? _editContext.Model, errorContext.Name);
FieldIdentifier.cs (1)
39return new FieldIdentifier(model, fieldName);
Microsoft.AspNetCore.Components.Web (2)
Forms\Mapping\EditContextFormMappingExtensions.cs (1)
67fieldIdentifier = new FieldIdentifier(owner ?? _editContext.Model, key);
Forms\ValidationSummary.cs (1)
77: CurrentEditContext.GetValidationMessages(new FieldIdentifier(Model, string.Empty));
84 references to FieldIdentifier
Aspire.Dashboard (4)
Components\Dialogs\InteractionsInputDialog.razor.cs (4)
121var field = GetFieldIdentifier(inputViewModel); 135var field = GetFieldIdentifier(inputModel); 145private void InputValueChanged(FieldIdentifier field) 165private static FieldIdentifier GetFieldIdentifier(InputViewModel inputModel)
Microsoft.AspNetCore.Components.Endpoints (4)
Forms\ClientValidationCache.cs (2)
40IReadOnlyDictionary<FieldIdentifier, string> fields, 70in FieldIdentifier fieldIdentifier,
Forms\DataAnnotationsClientValidationProvider.cs (2)
37public override RenderFragment? RenderClientValidationRules(EditContext editContext, IReadOnlyDictionary<FieldIdentifier, string> renderedFields) 62internal string? SerializeClientValidationData(EditContext editContext, IReadOnlyDictionary<FieldIdentifier, string> renderedFields)
Microsoft.AspNetCore.Components.Forms (60)
EditContext.cs (25)
20private readonly Dictionary<FieldIdentifier, FieldState> _fieldStates = new Dictionary<FieldIdentifier, FieldState>(); 64/// Supplies a <see cref="FieldIdentifier"/> corresponding to a specified field name 68/// <returns>A <see cref="FieldIdentifier"/> corresponding to a specified field name on this <see cref="EditContext"/>'s <see cref="Model"/>.</returns> 69public FieldIdentifier Field(string fieldName) 91public void NotifyFieldChanged(in FieldIdentifier fieldIdentifier) 109public void MarkAsUnmodified(in FieldIdentifier fieldIdentifier) 173public IEnumerable<string> GetValidationMessages(FieldIdentifier fieldIdentifier) 192=> GetValidationMessages(FieldIdentifier.Create(accessor)); 198public bool IsModified(in FieldIdentifier fieldIdentifier) 209=> IsModified(FieldIdentifier.Create(accessor)); 215public bool IsValid(in FieldIdentifier fieldIdentifier) 224=> IsValid(FieldIdentifier.Create(accessor)); 345/// and the returned <see cref="Task"/> is tracked for <see cref="IsValidationPending(in FieldIdentifier)"/> 346/// and <see cref="IsValidationFaulted(in FieldIdentifier)"/>. A validation already tracked for the field 364public void RegisterAsyncFieldValidator(in FieldIdentifier fieldIdentifier, Func<CancellationToken, Task> validator) 422/// <see cref="IsValidationFaulted(in FieldIdentifier)"/> value. 426public bool IsValidationPending(in FieldIdentifier fieldIdentifier) 437=> IsValidationPending(FieldIdentifier.Create(accessor)); 442/// use the <see cref="IsValidationPending(in FieldIdentifier)"/> overload for those. 453public bool IsValidationFaulted(in FieldIdentifier fieldIdentifier) 464=> IsValidationFaulted(FieldIdentifier.Create(accessor)); 470/// <see cref="IsValidationFaulted(in FieldIdentifier)"/> overload. 475internal FieldState? GetFieldState(in FieldIdentifier fieldIdentifier) 481internal FieldState GetOrAddFieldState(in FieldIdentifier fieldIdentifier)
EditContextDataAnnotationsExtensions.cs (5)
80var fieldIdentifier = eventArgs.FieldIdentifier; 247var fieldIdentifier = new FieldIdentifier(errorContext.Container ?? _editContext.Model, errorContext.Name); 255private async Task ValidateFieldWithValidatorAsync(FieldIdentifier fieldIdentifier, PropertyInfo propertyInfo, CancellationToken cancellationToken) 289FieldIdentifier fieldIdentifier, 341private static bool TryGetValidatableProperty(in FieldIdentifier fieldIdentifier, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
FieldChangedEventArgs.cs (3)
14/// <param name="fieldIdentifier">The <see cref="Forms.FieldIdentifier"/></param> 15public FieldChangedEventArgs(in FieldIdentifier fieldIdentifier) 23public FieldIdentifier FieldIdentifier { get; }
FieldIdentifier.cs (9)
17public readonly struct FieldIdentifier : IEquatable<FieldIdentifier> 30/// Initializes a new instance of the <see cref="FieldIdentifier"/> structure. 34public static FieldIdentifier Create<TField>(Expression<Func<TField>> accessor) 43/// Initializes a new instance of the <see cref="FieldIdentifier"/> structure. 95=> obj is FieldIdentifier otherIdentifier 99/// Determines whether the specified <see cref="FieldIdentifier"/> is equal to the current field identifier. 103public bool Equals(FieldIdentifier otherIdentifier) 151throw new ArgumentException($"The provided expression contains a {accessorBody.GetType().Name} which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object."); 163throw new ArgumentException($"The provided expression contains a {accessorBody.GetType().Name} which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object.");
FieldState.cs (2)
8private readonly FieldIdentifier _fieldIdentifier; 16public FieldState(FieldIdentifier fieldIdentifier)
ValidationMessageStore.cs (16)
14private readonly Dictionary<FieldIdentifier, List<string>> _messages = new Dictionary<FieldIdentifier, List<string>>(); 30public void Add(in FieldIdentifier fieldIdentifier, string message) 39=> Add(FieldIdentifier.Create(accessor), message); 46public void Add(in FieldIdentifier fieldIdentifier, IEnumerable<string> messages) 55=> Add(FieldIdentifier.Create(accessor), messages); 60/// To get the validation messages across all validation message stores, use <see cref="EditContext.GetValidationMessages(FieldIdentifier)"/> instead 64public IEnumerable<string> this[FieldIdentifier fieldIdentifier] 70/// To get the validation messages across all validation message stores, use <see cref="EditContext.GetValidationMessages(FieldIdentifier)"/> instead 75=> this[FieldIdentifier.Create(accessor)]; 82foreach (var fieldIdentifier in _messages.Keys) 95=> Clear(FieldIdentifier.Create(accessor)); 101public void Clear(in FieldIdentifier fieldIdentifier) 107private List<string> GetOrCreateMessagesListForField(in FieldIdentifier fieldIdentifier) 119private void AssociateWithField(in FieldIdentifier fieldIdentifier) 122private void DissociateFromField(in FieldIdentifier fieldIdentifier)
Microsoft.AspNetCore.Components.Web (16)
Forms\ClientValidation\ClientValidationProvider.cs (2)
18/// The fields an input was rendered for, keyed by <see cref="FieldIdentifier"/> with the 28IReadOnlyDictionary<FieldIdentifier, string> renderedFields);
Forms\ClientValidation\RenderedFieldRegistry.cs (4)
8/// SSR, mapping each <see cref="FieldIdentifier"/> to the HTML <c>name</c> it rendered with. 15private readonly Dictionary<FieldIdentifier, string> _fields = []; 18public IReadOnlyDictionary<FieldIdentifier, string> Fields => _fields; 21public void Register(in FieldIdentifier fieldIdentifier, string renderedName)
Forms\EditContextFieldClassExtensions.cs (2)
24=> FieldCssClass(editContext, FieldIdentifier.Create(accessor)); 32public static string FieldCssClass(this EditContext editContext, in FieldIdentifier fieldIdentifier)
Forms\FieldCssClassProvider.cs (3)
19/// <c>"modified "</c> when <see cref="EditContext.IsModified(in FieldIdentifier)"/> is <c>true</c>. 26/// <param name="fieldIdentifier">The <see cref="FieldIdentifier"/>.</param> 28public virtual string GetFieldCssClass(EditContext editContext, in FieldIdentifier fieldIdentifier)
Forms\InputBase.cs (2)
72protected internal FieldIdentifier FieldIdentifier { get; set; } 263FieldIdentifier = FieldIdentifier.Create(ValueExpression);
Forms\Mapping\EditContextFormMappingExtensions.cs (1)
66FieldIdentifier fieldIdentifier;
Forms\ValidationMessage.cs (2)
17private FieldIdentifier _fieldIdentifier; 58_fieldIdentifier = FieldIdentifier.Create(For);