public sealed class PropertyDescriptor<T> Describes one bridged ViewModel property. Created by generated bridges.
Parameters
nameThe .NET property name.
getterReads the property value.
setterWrites the property from browser arguments, or
nullfor a read-only property.
Constructors
PropertyDescriptor
public PropertyDescriptor(string name, Func<T, object?> getter, Action<T, IBridgeArguments>? setter) Describes one bridged ViewModel property. Created by generated bridges.
Parameters
nameThe .NET property name.
getterReads the property value.
setterWrites the property from browser arguments, or
nullfor a read-only property.
PropertyDescriptor
public PropertyDescriptor(string name, Func<T, object?> getter, Action<T, IBridgeArguments>? setter, Func<T, object?> observe) Describes a property whose value comes from an observed sub-object, such as a navigation region slot.
Parameters
nameThe .NET property name.
getterReads the property's wire value.
setterWrites the property from browser arguments, or
nullfor a read-only property.observeReturns the sub-object the Bridge observes for this property. The Bridge subscribes when it is created and again when the ViewModel reports a change, and publishes when the sub-object changes. A
NavigationRegionpublishes when itsCurrentchanges and binds the window session as its navigator's presentation; anotherINotifyPropertyChangedpublishes on every change.
Properties
CanWrite
public bool CanWrite { get; } Whether the browser may write the property.
Name
public string Name { get; } The .NET property name.
Methods
Get
public object? Get(T vm) Reads the property value from vm.