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)
85
=> new
FieldIdentifier
(Model, fieldName);
EditContextDataAnnotationsExtensions.cs (2)
139
_messages.Add(new
FieldIdentifier
(_editContext.Model, fieldName: string.Empty), validationResult.ErrorMessage!);
247
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));
79 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 (65)
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 (27)
20
private 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>
84
public
FieldIdentifier
Field(string fieldName)
106
public void NotifyFieldChanged(in
FieldIdentifier
fieldIdentifier)
124
public void MarkAsUnmodified(in
FieldIdentifier
fieldIdentifier)
188
public IEnumerable<string> GetValidationMessages(
FieldIdentifier
fieldIdentifier)
207
=> GetValidationMessages(
FieldIdentifier
.Create(accessor));
213
public bool IsModified(in
FieldIdentifier
fieldIdentifier)
224
=> IsModified(
FieldIdentifier
.Create(accessor));
230
public 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.
447
public 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.
509
public bool IsValidationPending(in
FieldIdentifier
fieldIdentifier)
520
=> IsValidationPending(
FieldIdentifier
.Create(accessor));
527
/// <see cref="IsValidationPending(in
FieldIdentifier
)"/> overload for per-field state.
538
public 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.
561
internal FieldState? GetFieldState(in
FieldIdentifier
fieldIdentifier)
567
internal FieldState GetOrAddFieldState(in
FieldIdentifier
fieldIdentifier)
EditContextDataAnnotationsExtensions.cs (6)
55
private readonly Dictionary<string,
FieldIdentifier
> _validationPathToFieldIdentifierMapping = new();
81
var
fieldIdentifier = eventArgs.FieldIdentifier;
170
var
fieldIdentifier = _validationPathToFieldIdentifierMapping[fieldKey];
183
private void ValidateField(
FieldIdentifier
fieldIdentifier, PropertyInfo propertyInfo)
206
FieldIdentifier
fieldIdentifier,
264
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)
20
/// <see cref="EditContext.IsModified(in
FieldIdentifier
)"/> is <c>true</c>.
33
/// <param name="fieldIdentifier">The <see cref="
FieldIdentifier
"/>.</param>
35
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);