Class ParameterState<T>
The ParameterState<T> automatically manages parameter value changes for ParameterAttribute as part of MudBlazor's ParameterState framework. For details and usage please read CONTRIBUTING.md
public abstract class ParameterState<T>
Type Parameters
T
The type of the component's property value.
- Inheritance
-
ParameterState<T>
- Inherited Members
- Extension Methods
Remarks
You don't need to create this object directly. Instead, use the "MudComponentBase.RegisterParameter" method from within the component's constructor.
Constructors
ParameterState()
protected ParameterState()
Properties
Value
Gets the current value.
public abstract T? Value { get; }
Property Value
- T
Methods
SetValueAsync(T)
Set the parameter's value.
public abstract Task SetValueAsync(T value)
Parameters
value
TNew parameter's value.
Returns
Remarks
Note: you should never set the parameter's property directly from within the component. Instead, use SetValueAsync on the ParameterState object.
Operators
implicit operator T?(ParameterState<T>)
Defines an implicit conversion of a ParameterState<T> object to its underlying value of type T
.
public static implicit operator T?(ParameterState<T> parameterState)
Parameters
parameterState
ParameterState<T>The ParameterState<T> object to convert.
Returns
- T
The underlying value of type
T
.