Click or drag to resize

SerializableMetadata Class

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

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

The SerializableMetadata type exposes the following members.

Constructors
 NameDescription
Public methodSerializableMetadata Initializes a new instance of the SerializableMetadata class.
Public methodSerializableMetadata(MetadataFile) Initializes a new instance of the SerializableMetadata class.
Top
Properties
 NameDescription
Public propertyMetadataRecords Gets or sets the SerializableMetadataRecords contained in the SerializableMetadata.
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 SerializableMetadata serialized using XmlSerializer:
C#
<?xml version="1.0" encoding="utf-8" ?> 
<Metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <MetadataRecords>
    <MetadataRecord HistorianID="1" DataType="0" Name="TVA_CORD-BUS2:ABBV" Synonym1="4-PM1" Synonym2="VPHM" Synonym3="" 
      Description="Cordova ABB-521 500 kV Bus 2 Positive Sequence Voltage Magnitude" HardwareInfo="ABB RES521" Remarks="" 
      PlantCode="P1" UnitNumber="1" SystemName="CORD" SourceID="3" Enabled="true" ScanRate="0.0333333351" CompressionMinTime="0" 
      CompressionMaxTime="0" EngineeringUnits="Volts" LowWarning="475000" HighWarning="525000" LowAlarm="450000" HighAlarm="550000" 
      LowRange="475000" HighRange="525000" CompressionLimit="0" ExceptionLimit="0" DisplayDigits="7" SetDescription="" ClearDescription="" 
      AlarmState="0" ChangeSecurity="5" AccessSecurity="0" StepCheck="false" AlarmEnabled="false" AlarmFlags="0" AlarmDelay="0" AlarmToFile="false" 
      AlarmByEmail="false" AlarmByPager="false" AlarmByPhone="false" AlarmEmails="" AlarmPagers="" AlarmPhones="" /> 
  </MetadataRecords>
</Metadata>
This is the output for SerializableMetadata serialized using DataContractSerializer:
C#
<Metadata xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <MetadataRecords>
    <MetadataRecord>
      <HistorianID>1</HistorianID> 
      <DataType>0</DataType> 
      <Name>TVA_CORD-BUS2:ABBV</Name> 
      <Synonym1>4-PM1</Synonym1> 
      <Synonym2>VPHM</Synonym2> 
      <Synonym3 /> 
      <Description>Cordova ABB-521 500 kV Bus 2 Positive Sequence Voltage Magnitude</Description> 
      <HardwareInfo>ABB RES521</HardwareInfo> 
      <Remarks /> 
      <PlantCode>P1</PlantCode> 
      <UnitNumber>1</UnitNumber> 
      <SystemName>CORD</SystemName> 
      <SourceID>3</SourceID> 
      <Enabled>true</Enabled> 
      <ScanRate>0.0333333351</ScanRate> 
      <CompressionMinTime>0</CompressionMinTime> 
      <CompressionMaxTime>0</CompressionMaxTime> 
      <EngineeringUnits>Volts</EngineeringUnits> 
      <LowWarning>475000</LowWarning> 
      <HighWarning>525000</HighWarning> 
      <LowAlarm>450000</LowAlarm> 
      <HighAlarm>550000</HighAlarm> 
      <LowRange>475000</LowRange> 
      <HighRange>525000</HighRange> 
      <CompressionLimit>0</CompressionLimit> 
      <ExceptionLimit>0</ExceptionLimit> 
      <DisplayDigits>7</DisplayDigits> 
      <SetDescription /> 
      <ClearDescription /> 
      <AlarmState>0</AlarmState> 
      <ChangeSecurity>5</ChangeSecurity> 
      <AccessSecurity>0</AccessSecurity> 
      <StepCheck>false</StepCheck> 
      <AlarmEnabled>false</AlarmEnabled> 
      <AlarmFlags>0</AlarmFlags> 
      <AlarmDelay>0</AlarmDelay> 
      <AlarmToFile>false</AlarmToFile> 
      <AlarmByEmail>false</AlarmByEmail> 
      <AlarmByPager>false</AlarmByPager> 
      <AlarmByPhone>false</AlarmByPhone> 
      <AlarmEmails /> 
      <AlarmPagers /> 
      <AlarmPhones /> 
    </MetadataRecord>
  </MetadataRecords>
</Metadata>
This is the output for SerializableMetadata serialized using DataContractJsonSerializer:
C#
{
  "MetadataRecords":
    [{"HistorianID":1,
      "DataType":0,
      "Name":"TVA_CORD-BUS2:ABBV",
      "Synonym1":"4-PM1",
      "Synonym2":"VPHM",
      "Synonym3":"",
      "Description":"Cordova ABB-521 500 kV Bus 2 Positive Sequence Voltage Magnitude",
      "HardwareInfo":"ABB RES521",
      "Remarks":"",
      "PlantCode":"P1",
      "UnitNumber":1,
      "SystemName":"CORD",
      "SourceID":3,
      "Enabled":true,
      "ScanRate":0.0333333351,
      "CompressionMinTime":0,
      "CompressionMaxTime":0,
      "EngineeringUnits":"Volts",
      "LowWarning":475000,
      "HighWarning":525000,
      "LowAlarm":450000,
      "HighAlarm":550000,
      "LowRange":475000,
      "HighRange":525000,
      "CompressionLimit":0,
      "ExceptionLimit":0,
      "DisplayDigits":7,
      "SetDescription":"",
      "ClearDescription":"",
      "AlarmState":0,
      "ChangeSecurity":5,
      "AccessSecurity":0,
      "StepCheck":false,
      "AlarmEnabled":false,
      "AlarmFlags":0,
      "AlarmDelay":0,
      "AlarmToFile":false,
      "AlarmByEmail":false,
      "AlarmByPager":false,
      "AlarmByPhone":false,
      "AlarmEmails":"",
      "AlarmPagers":"",
      "AlarmPhones":""}]
}
See Also