/// <summary> /// Gets a string that indicates the status of the specified field. This will include /// some combination of "modified", "valid", or "invalid", depending on the status of the field. /// </summary> /// <param name="editContext">The <see cref="EditContext"/>.</param> /// <param name="fieldIdentifier">An identifier for the field.</param> /// <returns>A string that indicates the status of the field.</returns> public static string FieldClass(this EditContext editContext, in FieldIdentifier fieldIdentifier)
/// <summary> /// Gets a string that indicates the status of the specified field. This will include /// some combination of "modified", "valid", or "invalid", depending on the status of the field. /// </summary> /// <param name="editContext">The <see cref="EditContext"/>.</param> /// <param name="accessor">An identifier for the field.</param> /// <returns>A string that indicates the status of the field.</returns> public static string FieldClass <TField>(this EditContext editContext, Expression <Func <TField> > accessor) => FieldClass(editContext, FieldIdentifier.Create(accessor));
private static void ValidateField(EditContext editContext, ValidationMessageStore messages, in FieldIdentifier fieldIdentifier)
/// <summary> /// Gets a string that indicates the status of the specified field as a CSS class. /// </summary> /// <param name="editContext">The <see cref="EditContext"/>.</param> /// <param name="fieldIdentifier">The <see cref="FieldIdentifier"/>.</param> /// <returns>A CSS class name string.</returns> public virtual string GetFieldCssClass(EditContext editContext, in FieldIdentifier fieldIdentifier)
/// <summary> /// Creates an instance of <see cref="ValidationMessageStore"/>. /// </summary> /// <param name="editContext">The <see cref="EditContext"/> with which this store should be associated.</param> public ValidationMessageStore(EditContext editContext) { _editContext = editContext ?? throw new ArgumentNullException(nameof(editContext)); }
public void IsInitiallyUnmodified() { var editContext = new EditContext(new object()); Assert.False(editContext.IsModified()); }