Class ValueNodeInputViewModel<T>
A node input that keeps track of the latest value produced by either the connected ValueNodeOutputViewModel, or the ValueEditorViewModel in the Editor property.
Inheritance
Implements
Inherited Members
Namespace: NodeNetwork.Toolkit.ValueNode
Assembly: NodeNetworkToolkit.dll
Syntax
public class ValueNodeInputViewModel<T> : NodeInputViewModel, IReactiveNotifyPropertyChanged<IReactiveObject>, IHandleObservableErrors, IReactiveObject, INotifyPropertyChanged, INotifyPropertyChanging, IEnableLogger
Type Parameters
Name | Description |
---|---|
T | The type of object this input can receive |
Constructors
| Improve this Doc View SourceValueNodeInputViewModel(ValidationAction, ValidationAction)
Constructs a new ValueNodeInputViewModel with the specified ValidationActions. The default values are carefully chosen and should probably not be changed unless you know what you are doing.
Declaration
public ValueNodeInputViewModel(ValidationAction connectionChangedValidationAction = ValidationAction.PushDefaultValue, ValidationAction connectedValueChangedValidationAction = ValidationAction.IgnoreValidation)
Parameters
Type | Name | Description |
---|---|---|
ValidationAction | connectionChangedValidationAction | The validation behaviour when the connection of this input changes. |
ValidationAction | connectedValueChangedValidationAction | The validation behaviour when the value of this input changes. |
Properties
| Improve this Doc View SourceValue
The value currently associated with this input. If the input is not connected, the value is taken from ValueEditorViewModel.Value in the Editor property. If the input is connected, the value is taken from ValueNodeOutputViewModel.LatestValue unless the network is not traversable. Note that this value may be equal to default(T) if there is an error somewhere.
Declaration
public T Value { get; }
Property Value
Type | Description |
---|---|
T |
ValueChanged
An observable that fires when the input value changes. This may be because of a connection change, editor value change, network validation change, ...
Declaration
public IObservable<T> ValueChanged { get; }
Property Value
Type | Description |
---|---|
System.IObservable<T> |