BridgeValidationReader class

Namespace Runic.Application.Views.Generated in Runic.Application.Views 0.23.0

public sealed class BridgeValidationReader

Reads and observes the validation an object keeps outside INotifyDataErrorInfo, such as a ReactiveUI.Validation ValidationContext. Created by generated bridges.

Parameters

readErrors

Returns an object's errors, read as the entries of INotifyDataErrorInfo.GetErrors with null, or null when the object keeps no such validation (BridgeValidation.Write).

observe

Calls its Action whenever the object's validation changes, until the result is disposed, or returns null when the object keeps no such validation. The Bridge observes its ViewModel and every object of its data graph, so a change of a rule that names no member still publishes the validation member.

Constructors

BridgeValidationReader

public BridgeValidationReader(Func<object, IEnumerable?> readErrors, Func<object, Action, IDisposable?> observe)

Reads and observes the validation an object keeps outside INotifyDataErrorInfo, such as a ReactiveUI.Validation ValidationContext. Created by generated bridges.

Parameters

readErrors

Returns an object's errors, read as the entries of INotifyDataErrorInfo.GetErrors with null, or null when the object keeps no such validation (BridgeValidation.Write).

observe

Calls its Action whenever the object's validation changes, until the result is disposed, or returns null when the object keeps no such validation. The Bridge observes its ViewModel and every object of its data graph, so a change of a rule that names no member still publishes the validation member.

Properties

Observe

public Func<object, Action, IDisposable?> Observe { get; }

Observes an object's validation, or returns null when it keeps no such validation.

ReadErrors

public Func<object, IEnumerable?> ReadErrors { get; }

Returns an object's errors, or null when it keeps no such validation.