Skip to main content
Version: 0.3.x (0.3.0)

Class ValueObjectEditContextExtensions

Namespace: AdCodicem.ValueObjects.Blazor
Assembly: AdCodicem.ValueObjects.Blazor.dll

Reads the rule codes the inputs of value objects keep on their form's .

public static class ValueObjectEditContextExtensions

Inheritance​

object ← ValueObjectEditContextExtensions

Inherited Members​

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Remarks​

An holds a field's refusal as a message alone. An keeps the code of the rule beside it, in , from the refusal until the next text it reads, or until it is disposed: the field's equivalent of , for a test, a telemetry hook or a component that styles the field by rule rather than by its English message.

Methods​

TryGetValueObjectErrorCode(EditContext, in FieldIdentifier, out string?)​

Gets the code of the rule that refused the text of a field, while its input shows the refusal.

public static bool TryGetValueObjectErrorCode(this EditContext editContext, in FieldIdentifier field, out string? code)

Parameters​

editContext EditContext

The form's edit context.

field FieldIdentifier

The field.

code string?

The code: one of , or a code of the application's own rule.

Returns​

bool

true when the field's input shows text its value object refused.

Exceptions​

ArgumentNullException

editContext is null.