7 instantiations of FieldIdentifier
Aspire.Dashboard (1)
Components\Dialogs\InteractionsInputDialog.razor.cs (1)
184
return new
FieldIdentifier
(inputModel, fieldName);
Microsoft.AspNetCore.Components.Forms (4)
EditContext.cs (1)
70
=> new
FieldIdentifier
(Model, fieldName);
EditContextDataAnnotationsExtensions.cs (2)
186
_messages.Add(new
FieldIdentifier
(_editContext.Model, fieldName: string.Empty), validationResult.ErrorMessage!);
238
var fieldIdentifier = new
FieldIdentifier
(errorContext.Container ?? _editContext.Model, errorContext.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)
77
: CurrentEditContext.GetValidationMessages(new
FieldIdentifier
(Model, string.Empty));
87 references to FieldIdentifier
Aspire.Dashboard (5)
Components\Dialogs\InteractionsInputDialog.razor.cs (5)
124
var
field = GetFieldIdentifier(inputViewModel);
138
var
field = GetFieldIdentifier(inputModel);
152
private void InputValueChanged(
FieldIdentifier
field)
176
private static
FieldIdentifier
GetFieldIdentifier(InputViewModel inputModel)
254
var
field = GetFieldIdentifier(inputModel);
Microsoft.AspNetCore.Components.Endpoints (4)
Forms\ClientValidationCache.cs (2)
40
IReadOnlyDictionary<
FieldIdentifier
, string> fields,
70
in
FieldIdentifier
fieldIdentifier,
Forms\DataAnnotationsClientValidationProvider.cs (2)
37
public override RenderFragment? RenderClientValidationRules(EditContext editContext, IReadOnlyDictionary<
FieldIdentifier
, string> renderedFields)
62
internal string? SerializeClientValidationData(EditContext editContext, IReadOnlyDictionary<
FieldIdentifier
, string> renderedFields)
Microsoft.AspNetCore.Components.Forms (62)
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 (5)
76
var
fieldIdentifier = eventArgs.FieldIdentifier;
238
var
fieldIdentifier = new FieldIdentifier(errorContext.Container ?? _editContext.Model, errorContext.Name);
246
private async Task ValidateFieldWithValidatorAsync(
FieldIdentifier
fieldIdentifier, PropertyInfo propertyInfo, CancellationToken cancellationToken)
280
FieldIdentifier
fieldIdentifier,
332
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 (11)
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)
154
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.");
166
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.");
265
$"{nameof(
FieldIdentifier
)} only supports simple member accessors (fields, properties) of an object."),
300
$"{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 (16)
Forms\ClientValidation\ClientValidationProvider.cs (2)
18
/// The fields an input was rendered for, keyed by <see cref="
FieldIdentifier
"/> with the
28
IReadOnlyDictionary<
FieldIdentifier
, string> renderedFields);
Forms\ClientValidation\RenderedFieldRegistry.cs (4)
8
/// SSR, mapping each <see cref="
FieldIdentifier
"/> to the HTML <c>name</c> it rendered with.
15
private readonly Dictionary<
FieldIdentifier
, string> _fields = [];
18
public IReadOnlyDictionary<
FieldIdentifier
, string> Fields => _fields;
21
public void Register(in
FieldIdentifier
fieldIdentifier, string renderedName)
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)
84
protected internal
FieldIdentifier
FieldIdentifier { get; set; }
275
FieldIdentifier =
FieldIdentifier
.Create(ValueExpression);
Forms\Mapping\EditContextFormMappingExtensions.cs (1)
66
FieldIdentifier
fieldIdentifier;
Forms\ValidationMessage.cs (2)
17
private
FieldIdentifier
_fieldIdentifier;
58
_fieldIdentifier =
FieldIdentifier
.Create(For);