Click or drag to resize

SerializableTimeSeriesData Class

Represents a container for SerializableTimeSeriesDataPoints that can be serialized using XmlSerializer or DataContractJsonSerializer.
Inheritance Hierarchy
SystemObject
  GSF.Historian.DataServicesSerializableTimeSeriesData

Namespace: GSF.Historian.DataServices
Assembly: GSF.Historian (in GSF.Historian.dll) Version: 2.4.181-beta
Syntax
[XmlTypeAttribute("TimeSeriesData")]
[DataContractAttribute(Name = "TimeSeriesData", Namespace = "")]
public class SerializableTimeSeriesData
View Source

The SerializableTimeSeriesData type exposes the following members.

Constructors
 NameDescription
Public methodSerializableTimeSeriesData Initializes a new instance of the SerializableTimeSeriesData class.
Public methodSerializableTimeSeriesData(IEnumerableIDataPoint) Initializes a new instance of the SerializableTimeSeriesData class.
Top
Properties
 NameDescription
Public propertyTimeSeriesDataPoints Gets or sets the SerializableTimeSeriesDataPoints contained in the SerializableTimeSeriesData.
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Example
This is the output for SerializableTimeSeriesData serialized using XmlSerializer:
C#
<?xml version="1.0" encoding="utf-8" ?> 
<TimeSeriesData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <TimeSeriesDataPoints>
    <TimeSeriesDataPoint HistorianID="1" Time="21-Aug-2009 14:29:52.634" Value="59.9537773" Quality="Good" /> 
    <TimeSeriesDataPoint HistorianID="2" Time="21-Aug-2009 14:29:52.668" Value="60.0351028" Quality="Good" /> 
    <TimeSeriesDataPoint HistorianID="3" Time="21-Aug-2009 14:29:52.702" Value="59.99268" Quality="Good" /> 
    <TimeSeriesDataPoint HistorianID="4" Time="21-Aug-2009 14:29:52.736" Value="59.99003" Quality="Good" /> 
    <TimeSeriesDataPoint HistorianID="5" Time="21-Aug-2009 14:29:52.770" Value="59.9532661" Quality="Good" /> 
  </TimeSeriesDataPoints>
</TimeSeriesData>
This is the output for SerializableTimeSeriesData serialized using DataContractSerializer:
C#
<TimeSeriesData xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <TimeSeriesDataPoints>
    <TimeSeriesDataPoint>
      <HistorianID>1</HistorianID> 
      <Time>21-Aug-2009 14:31:56.176</Time> 
      <Value>60.0272522</Value> 
      <Quality>Good</Quality> 
    </TimeSeriesDataPoint>
    <TimeSeriesDataPoint>
      <HistorianID>2</HistorianID> 
      <Time>21-Aug-2009 14:31:56.210</Time> 
      <Value>60.0283241</Value> 
      <Quality>Good</Quality> 
    </TimeSeriesDataPoint>
    <TimeSeriesDataPoint>
      <HistorianID>3</HistorianID> 
      <Time>21-Aug-2009 14:31:56.244</Time> 
      <Value>60.0418167</Value> 
      <Quality>Good</Quality> 
    </TimeSeriesDataPoint>
    <TimeSeriesDataPoint>
      <HistorianID>4</HistorianID> 
      <Time>21-Aug-2009 14:31:56.278</Time> 
      <Value>60.0049438</Value> 
      <Quality>Good</Quality> 
    </TimeSeriesDataPoint>
    <TimeSeriesDataPoint>
      <HistorianID>5</HistorianID> 
      <Time>21-Aug-2009 14:31:56.312</Time> 
      <Value>59.9982834</Value> 
      <Quality>Good</Quality> 
    </TimeSeriesDataPoint>
  </TimeSeriesDataPoints>
</TimeSeriesData>
This is the output for SerializableTimeSeriesData serialized using DataContractJsonSerializer:
C#
{
  "TimeSeriesDataPoints":
    [{"HistorianID":1,
      "Time":"21-Aug-2009 14:37:04.804",
      "Value":59.9637527,
      "Quality":29},
     {"HistorianID":2,
      "Time":"21-Aug-2009 14:37:04.838",
      "Value":60.0154762,
      "Quality":29},
     {"HistorianID":3,
      "Time":"21-Aug-2009 14:37:04.872",
      "Value":59.977684,
      "Quality":29},
     {"HistorianID":3,
      "Time":"21-Aug-2009 14:37:04.906",
      "Value":59.97335,
      "Quality":29},
     {"HistorianID":5,
      "Time":"21-Aug-2009 14:37:04.940",
      "Value":59.974678,
      "Quality":29}]
}
See Also