7 instantiations of FieldIdentifier
Aspire.Dashboard (1)
Components\Dialogs\InteractionsInputDialog.razor.cs (1)
173
return new
FieldIdentifier
(inputModel, fieldName);
Microsoft.AspNetCore.Components.Forms (4)
EditContext.cs (1)
70
=> new
FieldIdentifier
(Model, fieldName);
EditContextDataAnnotationsExtensions.cs (2)
195
_messages.Add(new
FieldIdentifier
(_editContext.Model, fieldName: string.Empty), validationResult.ErrorMessage!);
346
new
FieldIdentifier
(context.Container ?? _editContext.Model, context.Name);
FieldIdentifier.cs (1)
39
return new
FieldIdentifier
(model, fieldName);
Microsoft.AspNetCore.Components.Web (2)
Forms\Mapping\EditContextFormMappingExtensions.cs (1)
67
fieldIdentifier = new
FieldIdentifier
(owner ?? _editContext.Model, key);
Forms\ValidationSummary.cs (1)
68
CurrentEditContext.GetValidationMessages(new
FieldIdentifier
(Model, string.Empty));
77 references to FieldIdentifier
Aspire.Dashboard (4)
Components\Dialogs\InteractionsInputDialog.razor.cs (4)
121
var
field = GetFieldIdentifier(inputViewModel);
135
var
field = GetFieldIdentifier(inputModel);
145
private void InputValueChanged(
FieldIdentifier
field)
165
private static
FieldIdentifier
GetFieldIdentifier(InputViewModel inputModel)
Microsoft.AspNetCore.Components.Forms (63)
ClientValidation\DefaultClientValidationService.cs (1)
36
public IReadOnlyDictionary<string, object>? GetClientValidationAttributes(
FieldIdentifier
fieldIdentifier)
ClientValidation\IClientValidationService.cs (1)
16
IReadOnlyDictionary<string, object>? GetClientValidationAttributes(
FieldIdentifier
fieldIdentifier);
EditContext.cs (25)
20
private 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>
69
public
FieldIdentifier
Field(string fieldName)
91
public void NotifyFieldChanged(in
FieldIdentifier
fieldIdentifier)
109
public void MarkAsUnmodified(in
FieldIdentifier
fieldIdentifier)
173
public IEnumerable<string> GetValidationMessages(
FieldIdentifier
fieldIdentifier)
192
=> GetValidationMessages(
FieldIdentifier
.Create(accessor));
198
public bool IsModified(in
FieldIdentifier
fieldIdentifier)
209
=> IsModified(
FieldIdentifier
.Create(accessor));
215
public 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
364
public void RegisterAsyncFieldValidator(in
FieldIdentifier
fieldIdentifier, Func<CancellationToken, Task> validator)
422
/// <see cref="IsValidationFaulted(in
FieldIdentifier
)"/> value.
426
public bool IsValidationPending(in
FieldIdentifier
fieldIdentifier)
437
=> IsValidationPending(
FieldIdentifier
.Create(accessor));
442
/// use the <see cref="IsValidationPending(in
FieldIdentifier
)"/> overload for those.
453
public bool IsValidationFaulted(in
FieldIdentifier
fieldIdentifier)
464
=> IsValidationFaulted(
FieldIdentifier
.Create(accessor));
470
/// <see cref="IsValidationFaulted(in
FieldIdentifier
)"/> overload.
475
internal FieldState? GetFieldState(in
FieldIdentifier
fieldIdentifier)
481
internal FieldState GetOrAddFieldState(in
FieldIdentifier
fieldIdentifier)
EditContextDataAnnotationsExtensions.cs (6)
55
private readonly Dictionary<string,
FieldIdentifier
> _validationPathToFieldIdentifierMapping = new();
81
var
fieldIdentifier = eventArgs.FieldIdentifier;
266
var
fieldIdentifier = _validationPathToFieldIdentifierMapping[fieldKey];
273
private async Task ValidateFieldWithValidatorAsync(
FieldIdentifier
fieldIdentifier, PropertyInfo propertyInfo, CancellationToken cancellationToken)
307
FieldIdentifier
fieldIdentifier,
363
private static bool TryGetValidatableProperty(in
FieldIdentifier
fieldIdentifier, [NotNullWhen(true)] out PropertyInfo? propertyInfo)
FieldChangedEventArgs.cs (3)
14
/// <param name="fieldIdentifier">The <see cref="Forms.
FieldIdentifier
"/></param>
15
public FieldChangedEventArgs(in
FieldIdentifier
fieldIdentifier)
23
public
FieldIdentifier
FieldIdentifier { get; }
FieldIdentifier.cs (9)
17
public readonly struct FieldIdentifier : IEquatable<
FieldIdentifier
>
30
/// Initializes a new instance of the <see cref="
FieldIdentifier
"/> structure.
34
public 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.
103
public bool Equals(
FieldIdentifier
otherIdentifier)
151
throw 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.");
163
throw 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)
8
private readonly
FieldIdentifier
_fieldIdentifier;
16
public FieldState(
FieldIdentifier
fieldIdentifier)
ValidationMessageStore.cs (16)
14
private readonly Dictionary<
FieldIdentifier
, List<string>> _messages = new Dictionary<
FieldIdentifier
, List<string>>();
30
public void Add(in
FieldIdentifier
fieldIdentifier, string message)
39
=> Add(
FieldIdentifier
.Create(accessor), message);
46
public 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
64
public 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)];
82
foreach (
var
fieldIdentifier in _messages.Keys)
95
=> Clear(
FieldIdentifier
.Create(accessor));
101
public void Clear(in
FieldIdentifier
fieldIdentifier)
107
private List<string> GetOrCreateMessagesListForField(in
FieldIdentifier
fieldIdentifier)
119
private void AssociateWithField(in
FieldIdentifier
fieldIdentifier)
122
private void DissociateFromField(in
FieldIdentifier
fieldIdentifier)
Microsoft.AspNetCore.Components.Web (10)
Forms\EditContextFieldClassExtensions.cs (2)
24
=> FieldCssClass(editContext,
FieldIdentifier
.Create(accessor));
32
public 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>
28
public virtual string GetFieldCssClass(EditContext editContext, in
FieldIdentifier
fieldIdentifier)
Forms\InputBase.cs (2)
73
protected internal
FieldIdentifier
FieldIdentifier { get; set; }
264
FieldIdentifier =
FieldIdentifier
.Create(ValueExpression);
Forms\Mapping\EditContextFormMappingExtensions.cs (1)
66
FieldIdentifier
fieldIdentifier;
Forms\ValidationMessage.cs (2)
18
private
FieldIdentifier
_fieldIdentifier;
59
_fieldIdentifier =
FieldIdentifier
.Create(For);