Class UnaryCondition
Definition
Namespace: StardewUI.Framework.Binding
Assembly: StardewUI.dll
A condition based on a single value that is convertible to a Boolean.
Inheritance
Object ⇦ UnaryCondition
Implements
ICondition, IDisposable
Remarks
Passes whenever the value's boolean representation is true
. Used for *if
attributes.
Members
Constructors
Name | Description |
---|---|
UnaryCondition(IValueSourceFactory, IValueConverterFactory, IResolutionScope, IAttribute) | A condition based on a single value that is convertible to a Boolean. |
Properties
Name | Description |
---|---|
Context | The context for evaluating the condition; i.e. the context of the node to which the condition applies. |
Passed | Whether or not the condition was passing as of the last Update(). |
Methods
Name | Description |
---|---|
Dispose() | |
Update() | Re-evaluates the condition and updates the Passed state. |
Details
Constructors
UnaryCondition(IValueSourceFactory, IValueConverterFactory, IResolutionScope, IAttribute)
A condition based on a single value that is convertible to a Boolean.
public UnaryCondition(StardewUI.Framework.Sources.IValueSourceFactory valueSourceFactory, StardewUI.Framework.Converters.IValueConverterFactory valueConverterFactory, StardewUI.Framework.Content.IResolutionScope resolutionScope, StardewUI.Framework.Dom.IAttribute attribute);
Parameters
valueSourceFactory
IValueSourceFactory
The factory responsible for creating IValueSource<T> instances from attribute data.
valueConverterFactory
IValueConverterFactory
The factory responsible for creating IValueConverter<TSource, TDestination> instances, used to convert bound values to the types required by the target view.
resolutionScope
IResolutionScope
Scope for resolving externalized attributes, such as translation keys.
attribute
IAttribute
The attribute containing the conditional expression.
Remarks
Passes whenever the value's boolean representation is true
. Used for *if
attributes.
Properties
Context
The context for evaluating the condition; i.e. the context of the node to which the condition applies.
Property Value
Passed
Whether or not the condition was passing as of the last Update().
Property Value
Methods
Dispose()
Update()
Re-evaluates the condition and updates the Passed state.