Class DataPoint<T>
Provides a data point with history, sources and a chosen value.
Inherited Members
Namespace: IAI.DT.DataModel
Assembly: IAI.DT.DataModel.dll
Syntax
public class DataPoint<T>
Type Parameters
| Name | Description |
|---|---|
| T | The type of the underlying DataPoint<T> which can exhibit multiple values, e.g. string, int, float, Address etc |
Constructors
DataPoint()
Constructor - uses by serializers
Declaration
public DataPoint()
DataPoint(T, Sources, DateTime, DateTime?)
Constructor
Declaration
public DataPoint(T value, Sources dataSource, DateTime fetchDateTime, DateTime? valueDateTime)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The initial value for this DataPoint |
| Sources | dataSource | The source from which this value has been obtained. |
| DateTime | fetchDateTime | The time at which this value has been obtained |
| DateTime? | valueDateTime | The time to be associated with this value if different from fetchDateTime |
Properties
DataPointValue
The preferred data point value taken from the list of available DataPointValue<T>.
Declaration
public DataPointValue<T>? DataPointValue { get; set; }
Property Value
| Type | Description |
|---|---|
| DataPointValue<T> |
RuleReport
A report of any issues found when running rules against this data point.
Declaration
public string? RuleReport { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Value
The preferred value for the DataPoint<T> taken from the list of available DataPointValue<T>.
Declaration
[JsonIgnore]
public T? Value { get; }
Property Value
| Type | Description |
|---|---|
| T |
Remarks
The value will be populated by the DataManager when merging assets. The value will be set using configurable rule executed by the DataManager, in the absence of a rule the default value will be used.
Values
List of available DataPointValue for this data point, each item includes date/time and source metadata
Declaration
public List<DataPointValue<T>> Values { get; }
Property Value
| Type | Description |
|---|---|
| List<DataPointValue<T>> |
ValuesMetaData
The meta data associated with this data point value
Declaration
[JsonIgnore]
public IEnumerable<DataPointValueMetadata> ValuesMetaData { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<DataPointValueMetadata> |
Methods
AddValue(object, Sources, DateTime, DateTime?, string?)
Adds a new DataPointValue<T> to the collection of values held
Declaration
public void AddValue(object newValue, Sources dataSource, DateTime fetchDateTime, DateTime? valueDateTime = null, string? user = null)
Parameters
| Type | Name | Description |
|---|---|---|
| object | newValue | The value to added to this DataPoint |
| Sources | dataSource | The source from which this value has been obtained. |
| DateTime | fetchDateTime | The time at which this value has been obtained |
| DateTime? | valueDateTime | The time to be associated with this value if different from fetchDateTime |
| string | user | The user that produced the given value |
ToString()
Declaration
[ExcludeFromCodeCoverage]
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |