public class ViewModelBridge : IDisposable Base class of generated bridges that expose one ViewModel over an IBridgeTransport.
Remarks
A Bridge serves its route of the Views protocol 4 (specs/application/README.md): the requests in BridgeRuntime.Requests.cs, the publication of its state in BridgeRuntime.Publication.cs, and the operation and interaction requests in BridgeRuntime.Operations.cs.
Constructors
ViewModelBridge
protected ViewModelBridge(IBridgeTransport transport, INotifyPropertyChanged vm, Type modelType, string name, BridgeStateMember[] state, PropertyDescriptor[] properties, CheckedPropertyDescriptor[] checkedProperties, CommandDescriptor[] commands, string? contractFingerprint = null, WindowContentSession? content = null, BridgeInteractionDescriptor[]? interactions = null, BridgeDataSubscriptionMember[]? dataSubscriptions = null, BridgeCollectionDescriptor[]? collections = null, BridgeValidationReader? validationReader = null) Creates the Bridge of a ViewModel whose state is written member by member.
Parameters
transportThe window's transport.
vmThe ViewModel.
modelTypeThe ViewModel's declared type, which names it in the contract, logs and telemetry; the generated Bridge passes
typeofof its ViewModel.nameThe route name.
stateEvery state member, in state order.
propertiesThe bridged properties.
checkedPropertiesThe properties with acknowledged field writes, if any.
commandsThe bridged commands.
contractFingerprintThe generated contract fingerprint.
contentThe window's content session.
interactionsThe View's interactions.
dataSubscriptionsThe data graph the Bridge observes.
collectionsThe keyed collections.
validationReaderReads and observes the validation the ViewModel and its data graph keep outside
INotifyDataErrorInfo, such as a ReactiveUI.ValidationValidationContext, ornull. A change it observes publishes the state; checked writes report the messages it reads for their member inapplied.validation.
Methods
Dispose
public virtual void Dispose() Stops serving the Bridge's route and observing the ViewModel.