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)
85=> new FieldIdentifier(Model, fieldName);
EditContextDataAnnotationsExtensions.cs (2)
139_messages.Add(new FieldIdentifier(_editContext.Model, fieldName: string.Empty), validationResult.ErrorMessage!); 247new FieldIdentifier(context.Container ?? _editContext.Model, context.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)
68CurrentEditContext.GetValidationMessages(new FieldIdentifier(Model, string.Empty));
79 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.Forms (65)
ClientValidation\DefaultClientValidationService.cs (1)
36public IReadOnlyDictionary<string, object>? GetClientValidationAttributes(FieldIdentifier fieldIdentifier)
ClientValidation\IClientValidationService.cs (1)
16IReadOnlyDictionary<string, object>? GetClientValidationAttributes(FieldIdentifier fieldIdentifier);
EditContext.cs (27)
20private readonly Dictionary<FieldIdentifier, FieldState> _fieldStates = new Dictionary<FieldIdentifier, FieldState>(); 79/// Supplies a <see cref="FieldIdentifier"/> corresponding to a specified field name 83/// <returns>A <see cref="FieldIdentifier"/> corresponding to a specified field name on this <see cref="EditContext"/>'s <see cref="Model"/>.</returns> 84public FieldIdentifier Field(string fieldName) 106public void NotifyFieldChanged(in FieldIdentifier fieldIdentifier) 124public void MarkAsUnmodified(in FieldIdentifier fieldIdentifier) 188public IEnumerable<string> GetValidationMessages(FieldIdentifier fieldIdentifier) 207=> GetValidationMessages(FieldIdentifier.Create(accessor)); 213public bool IsModified(in FieldIdentifier fieldIdentifier) 224=> IsModified(FieldIdentifier.Create(accessor)); 230public bool IsValid(in FieldIdentifier fieldIdentifier) 239=> IsValid(FieldIdentifier.Create(accessor)); 425/// pending/faulted state queries via <see cref="IsValidationPending(in FieldIdentifier)"/> 426/// and <see cref="IsValidationFaulted(in FieldIdentifier)"/>. If a task is already tracked 435/// <see cref="IsValidationFaulted(in FieldIdentifier)"/>, and <paramref name="cts"/> is disposed. 447public void AddValidationTask(in FieldIdentifier fieldIdentifier, Task task, CancellationTokenSource cts) 504/// <see cref="IsValidationPending(in FieldIdentifier)"/> to become <c>false</c> is guaranteed 505/// to also see the final <see cref="IsValidationFaulted(in FieldIdentifier)"/> value. 509public bool IsValidationPending(in FieldIdentifier fieldIdentifier) 520=> IsValidationPending(FieldIdentifier.Create(accessor)); 527/// <see cref="IsValidationPending(in FieldIdentifier)"/> overload for per-field state. 538public bool IsValidationFaulted(in FieldIdentifier fieldIdentifier) 549=> IsValidationFaulted(FieldIdentifier.Create(accessor)); 556/// For per-field validator faults from <see cref="AddValidationTask"/>, use the <see cref="IsValidationFaulted(in FieldIdentifier)"/> overload. 561internal FieldState? GetFieldState(in FieldIdentifier fieldIdentifier) 567internal FieldState GetOrAddFieldState(in FieldIdentifier fieldIdentifier)
EditContextDataAnnotationsExtensions.cs (6)
55private readonly Dictionary<string, FieldIdentifier> _validationPathToFieldIdentifierMapping = new(); 81var fieldIdentifier = eventArgs.FieldIdentifier; 170var fieldIdentifier = _validationPathToFieldIdentifierMapping[fieldKey]; 183private void ValidateField(FieldIdentifier fieldIdentifier, PropertyInfo propertyInfo) 206FieldIdentifier fieldIdentifier, 264private 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 (10)
Forms\EditContextFieldClassExtensions.cs (2)
24=> FieldCssClass(editContext, FieldIdentifier.Create(accessor)); 32public static string FieldCssClass(this EditContext editContext, in FieldIdentifier fieldIdentifier)
Forms\FieldCssClassProvider.cs (3)
20/// <see cref="EditContext.IsModified(in FieldIdentifier)"/> is <c>true</c>. 33/// <param name="fieldIdentifier">The <see cref="FieldIdentifier"/>.</param> 35public virtual string GetFieldCssClass(EditContext editContext, in FieldIdentifier fieldIdentifier)
Forms\InputBase.cs (2)
73protected internal FieldIdentifier FieldIdentifier { get; set; } 264FieldIdentifier = FieldIdentifier.Create(ValueExpression);
Forms\Mapping\EditContextFormMappingExtensions.cs (1)
66FieldIdentifier fieldIdentifier;
Forms\ValidationMessage.cs (2)
18private FieldIdentifier _fieldIdentifier; 59_fieldIdentifier = FieldIdentifier.Create(For);