Class ImmutableValue<T>
Represents an immutable value of a specific type.
public sealed class ImmutableValue<T> : ImmutableValue, IValue<T?>, IHasChanges, INotifyValueChanged
Type Parameters
T
- Inheritance
-
ImmutableValue<T>
- Implements
-
IValue<T>
- Inherited Members
- Extension Methods
Fields
Instance
Gets the singleton instance of the immutable value for the specified type.
public static readonly ImmutableValue<T> Instance
Field Value
Properties
HasValue
Returns true if the value is not null.
public bool HasValue { get; }
Property Value
IsDefaulted
Always true. Immutable values are always defaulted.
public bool IsDefaulted { get; }
Property Value
Value
Gets or sets the value. Always returns the default value and ignores sets.
public T? Value { get; set; }
Property Value
- T
Methods
GetText()
Gets the string representation of the value.
public string GetText()
Returns
SetDefaulted()
Does nothing. Immutable values are always defaulted.
public void SetDefaulted()
ToString()
Returns the string representation of the value.
public override string ToString()