Class DataValue
Data value helpers.
public static class DataValue
- Inheritance
-
DataValue
- Inherited Members
Properties
Empty
Gets the empty IDataValue instance that contains a null value and that does not use units or any special value formatting.
public static IDataValue Empty { get; }
Property Value
Methods
FromValue<T>(T)
Creates a DataValue<T> from a value, without units or any special value formatting.
public static DataValue<T> FromValue<T>(T value)
Parameters
value
TThe value.
Returns
- DataValue<T>
A new DataValue<T> instance.
Type Parameters
T
The data value type
FromValue<T>(T, IDataValueDescriptor)
Creates a DataValue<T> from a value and a specified descriptor.
public static DataValue<T> FromValue<T>(T value, IDataValueDescriptor descriptor)
Parameters
value
TThe value.
descriptor
IDataValueDescriptorThe data value descriptor.
Returns
- DataValue<T>
A new DataValue<T> instance.
Type Parameters
T
The data value type
Exceptions
- ArgumentNullException
descriptor
is null.