C# Class Opc.Ua.XmlDecoder

Reads objects from a XML stream.
Inheritance: IDecoder, IDisposable
Afficher le fichier Open project: OPCFoundation/UA-.NETStandardLibrary Class Usage Examples

Méthodes publiques

Méthode Description
Close ( ) : void

Closes the stream used for reading.

Close ( bool checkEof ) : void

Closes the stream used for reading.

Dispose ( ) : void

Frees any unmanaged resources.

LoadStringTable ( string tableName, string elementName, StringTable stringTable ) : bool

Initializes a string table from an XML stream.

Peek ( System.Xml.XmlNodeType nodeType ) : XmlQualifiedName

Returns the qualified name for the next element in the stream.

Peek ( string fieldName ) : bool

Returns true if the specified field is the next element to be extracted.

PopNamespace ( ) : void

Pops a namespace from the namespace stack.

PushNamespace ( string namespaceUri ) : void

Pushes a namespace onto the namespace stack.

ReadBoolean ( string fieldName ) : bool

Reads a boolean from the stream.

ReadBooleanArray ( string fieldName ) : BooleanCollection

Reads a boolean array from the stream.

ReadByte ( string fieldName ) : byte

Reads a byte from the stream.

ReadByteArray ( string fieldName ) : ByteCollection

Reads a byte array from the stream.

ReadByteString ( string fieldName ) : byte[]

Reads a byte string from the stream.

ReadByteStringArray ( string fieldName ) : ByteStringCollection

Reads a byte string array from the stream.

ReadDataValue ( string fieldName ) : Opc.Ua.DataValue

Reads an DataValue from the stream.

ReadDataValueArray ( string fieldName ) : DataValueCollection

Reads an DataValue array from the stream.

ReadDateTime ( string fieldName ) : System.DateTime

Reads a UTC date/time from the stream.

ReadDateTimeArray ( string fieldName ) : DateTimeCollection

Reads a UTC date/time array from the stream.

ReadDiagnosticInfo ( ) : DiagnosticInfo

Reads an DiagnosticInfo from the stream.

ReadDiagnosticInfo ( string fieldName ) : DiagnosticInfo

Reads an DiagnosticInfo from the stream.

ReadDiagnosticInfoArray ( string fieldName ) : DiagnosticInfoCollection

Reads an DiagnosticInfo array from the stream.

ReadDouble ( string fieldName ) : double

Reads a double from the stream.

ReadDoubleArray ( string fieldName ) : DoubleCollection

Reads a double array from the stream.

ReadEncodeable ( string fieldName, System systemType ) : IEncodeable

Reads an encodeable object from the stream.

ReadEncodeableArray ( string fieldName, System systemType ) : Array

Reads an encodeable object array from the stream.

ReadEnumerated ( string fieldName, System enumType ) : Enum

Reads an enumerated value from the stream.

ReadEnumeratedArray ( string fieldName, System enumType ) : Array

Reads an enumerated value array from the stream.

ReadExpandedNodeId ( string fieldName ) : Opc.Ua.ExpandedNodeId

Reads an ExpandedNodeId from the stream.

ReadExpandedNodeIdArray ( string fieldName ) : ExpandedNodeIdCollection

Reads an ExpandedNodeId array from the stream.

ReadExtensionObject ( string fieldName ) : Opc.Ua.ExtensionObject

Reads an extension object from the stream.

ReadExtensionObjectArray ( string fieldName ) : ExtensionObjectCollection

Reads an array of extension objects from the stream.

ReadExtensionObjectBody ( Opc.Ua.ExpandedNodeId typeId ) : object

Reads the body extension object from the stream.

ReadFloat ( string fieldName ) : float

Reads a float from the stream.

ReadFloatArray ( string fieldName ) : FloatCollection

Reads a float array from the stream.

ReadGuid ( string fieldName ) : Uuid

Reads a GUID from the stream.

ReadGuidArray ( string fieldName ) : UuidCollection

Reads a GUID array from the stream.

ReadInt16 ( string fieldName ) : short

Reads a short from the stream.

ReadInt16Array ( string fieldName ) : Int16Collection

Reads a short array from the stream.

ReadInt32 ( string fieldName ) : int

Reads an int from the stream.

ReadInt32Array ( string fieldName ) : Int32Collection

Reads a int array from the stream.

ReadInt64 ( string fieldName ) : long

Reads a long from the stream.

ReadInt64Array ( string fieldName ) : Int64Collection

Reads a long array from the stream.

ReadLocalizedText ( string fieldName ) : Opc.Ua.LocalizedText

Reads an LocalizedText from the stream.

ReadLocalizedTextArray ( string fieldName ) : LocalizedTextCollection

Reads an LocalizedText array from the stream.

ReadNodeId ( string fieldName ) : Opc.Ua.NodeId

Reads an NodeId from the stream.

ReadNodeIdArray ( string fieldName ) : NodeIdCollection

Reads an NodeId array from the stream.

ReadQualifiedName ( string fieldName ) : Opc.Ua.QualifiedName

Reads an QualifiedName from the stream.

ReadQualifiedNameArray ( string fieldName ) : QualifiedNameCollection

Reads an QualifiedName array from the stream.

ReadSByte ( string fieldName ) : sbyte

Reads a sbyte from the stream.

ReadSByteArray ( string fieldName ) : SByteCollection

Reads a sbyte array from the stream.

ReadStartElement ( ) : void

Returns the qualified name for the next element in the stream.

ReadStatusCode ( string fieldName ) : Opc.Ua.StatusCode

Reads an StatusCode from the stream.

ReadStatusCodeArray ( string fieldName ) : StatusCodeCollection

Reads an StatusCode array from the stream.

ReadString ( string fieldName ) : string

Reads a string from the stream.

ReadStringArray ( string fieldName ) : StringCollection

Reads a string array from the stream.

ReadUInt16 ( string fieldName ) : ushort

Reads a ushort from the stream.

ReadUInt16Array ( string fieldName ) : UInt16Collection

Reads a ushort array from the stream.

ReadUInt32 ( string fieldName ) : uint

Reads a uint from the stream.

ReadUInt32Array ( string fieldName ) : UInt32Collection

Reads a uint array from the stream.

ReadUInt64 ( string fieldName ) : ulong

Reads a ulong from the stream.

ReadUInt64Array ( string fieldName ) : UInt64Collection

Reads a ulong array from the stream.

ReadVariant ( string fieldName ) : Variant

Reads an Variant from the stream.

ReadVariantArray ( string fieldName ) : VariantCollection

Reads an Variant array from the stream.

ReadXmlElement ( string fieldName ) : XmlElement

Reads an XmlElement from the stream.

ReadXmlElementArray ( string fieldName ) : XmlElementCollection

Reads an XmlElement array from the stream.

SetMappingTables ( Opc.Ua.NamespaceTable namespaceUris, StringTable serverUris ) : void

Initializes the tables used to map namespace and server uris during decoding.

Skip ( XmlQualifiedName qname ) : void

Skips to the end of the specified element.

XmlDecoder ( ServiceMessageContext context ) : System

Initializes the object with default values.

XmlDecoder ( System systemType, XmlReader reader, ServiceMessageContext context ) : System

Initializes the object with a XML reader.

XmlDecoder ( XmlElement element, ServiceMessageContext context ) : System

Initializes the object with an XML element to parse.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

An overrideable version of the Dispose.

Private Methods

Méthode Description
BeginField ( string fieldName, bool isOptional ) : bool

Reads the start of filed where the presences of the xsi:nil attribute is not significant.

BeginField ( string fieldName, bool isOptional, bool &isNil ) : bool

Reads the start of field.

EndField ( string fieldName ) : void

Reads the end of a field.

ExtractXml ( StringBuilder builder ) : void

Exracts the XML from the reader.

Initialize ( ) : void

Sets private members to default values.

MoveToElement ( string elementName ) : bool

Moves to the next start element.

ReadMatrix ( string fieldName ) : System.Matrix

Reads an Matrix from the stream.

ReadString ( ) : string

Reads a string from the stream.

ReadVariantContents ( TypeInfo &typeInfo ) : object

Method Details

Close() public méthode

Closes the stream used for reading.
public Close ( ) : void
Résultat void

Close() public méthode

Closes the stream used for reading.
public Close ( bool checkEof ) : void
checkEof bool
Résultat void

Dispose() public méthode

Frees any unmanaged resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

An overrideable version of the Dispose.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

LoadStringTable() public méthode

Initializes a string table from an XML stream.
public LoadStringTable ( string tableName, string elementName, StringTable stringTable ) : bool
tableName string Name of the table.
elementName string Name of the element.
stringTable StringTable The string table.
Résultat bool

Peek() public méthode

Returns the qualified name for the next element in the stream.
public Peek ( System.Xml.XmlNodeType nodeType ) : XmlQualifiedName
nodeType System.Xml.XmlNodeType
Résultat System.Xml.XmlQualifiedName

Peek() public méthode

Returns true if the specified field is the next element to be extracted.
public Peek ( string fieldName ) : bool
fieldName string
Résultat bool

PopNamespace() public méthode

Pops a namespace from the namespace stack.
public PopNamespace ( ) : void
Résultat void

PushNamespace() public méthode

Pushes a namespace onto the namespace stack.
public PushNamespace ( string namespaceUri ) : void
namespaceUri string
Résultat void

ReadBoolean() public méthode

Reads a boolean from the stream.
public ReadBoolean ( string fieldName ) : bool
fieldName string
Résultat bool

ReadBooleanArray() public méthode

Reads a boolean array from the stream.
public ReadBooleanArray ( string fieldName ) : BooleanCollection
fieldName string
Résultat BooleanCollection

ReadByte() public méthode

Reads a byte from the stream.
public ReadByte ( string fieldName ) : byte
fieldName string
Résultat byte

ReadByteArray() public méthode

Reads a byte array from the stream.
public ReadByteArray ( string fieldName ) : ByteCollection
fieldName string
Résultat ByteCollection

ReadByteString() public méthode

Reads a byte string from the stream.
public ReadByteString ( string fieldName ) : byte[]
fieldName string
Résultat byte[]

ReadByteStringArray() public méthode

Reads a byte string array from the stream.
public ReadByteStringArray ( string fieldName ) : ByteStringCollection
fieldName string
Résultat ByteStringCollection

ReadDataValue() public méthode

Reads an DataValue from the stream.
public ReadDataValue ( string fieldName ) : Opc.Ua.DataValue
fieldName string
Résultat Opc.Ua.DataValue

ReadDataValueArray() public méthode

Reads an DataValue array from the stream.
public ReadDataValueArray ( string fieldName ) : DataValueCollection
fieldName string
Résultat DataValueCollection

ReadDateTime() public méthode

Reads a UTC date/time from the stream.
public ReadDateTime ( string fieldName ) : System.DateTime
fieldName string
Résultat System.DateTime

ReadDateTimeArray() public méthode

Reads a UTC date/time array from the stream.
public ReadDateTimeArray ( string fieldName ) : DateTimeCollection
fieldName string
Résultat DateTimeCollection

ReadDiagnosticInfo() public méthode

Reads an DiagnosticInfo from the stream.
public ReadDiagnosticInfo ( ) : DiagnosticInfo
Résultat DiagnosticInfo

ReadDiagnosticInfo() public méthode

Reads an DiagnosticInfo from the stream.
public ReadDiagnosticInfo ( string fieldName ) : DiagnosticInfo
fieldName string
Résultat DiagnosticInfo

ReadDiagnosticInfoArray() public méthode

Reads an DiagnosticInfo array from the stream.
public ReadDiagnosticInfoArray ( string fieldName ) : DiagnosticInfoCollection
fieldName string
Résultat DiagnosticInfoCollection

ReadDouble() public méthode

Reads a double from the stream.
public ReadDouble ( string fieldName ) : double
fieldName string
Résultat double

ReadDoubleArray() public méthode

Reads a double array from the stream.
public ReadDoubleArray ( string fieldName ) : DoubleCollection
fieldName string
Résultat DoubleCollection

ReadEncodeable() public méthode

Reads an encodeable object from the stream.
public ReadEncodeable ( string fieldName, System systemType ) : IEncodeable
fieldName string
systemType System
Résultat IEncodeable

ReadEncodeableArray() public méthode

Reads an encodeable object array from the stream.
public ReadEncodeableArray ( string fieldName, System systemType ) : Array
fieldName string
systemType System
Résultat System.Array

ReadEnumerated() public méthode

Reads an enumerated value from the stream.
public ReadEnumerated ( string fieldName, System enumType ) : Enum
fieldName string
enumType System
Résultat System.Enum

ReadEnumeratedArray() public méthode

Reads an enumerated value array from the stream.
public ReadEnumeratedArray ( string fieldName, System enumType ) : Array
fieldName string
enumType System
Résultat System.Array

ReadExpandedNodeId() public méthode

Reads an ExpandedNodeId from the stream.
public ReadExpandedNodeId ( string fieldName ) : Opc.Ua.ExpandedNodeId
fieldName string
Résultat Opc.Ua.ExpandedNodeId

ReadExpandedNodeIdArray() public méthode

Reads an ExpandedNodeId array from the stream.
public ReadExpandedNodeIdArray ( string fieldName ) : ExpandedNodeIdCollection
fieldName string
Résultat ExpandedNodeIdCollection

ReadExtensionObject() public méthode

Reads an extension object from the stream.
public ReadExtensionObject ( string fieldName ) : Opc.Ua.ExtensionObject
fieldName string
Résultat Opc.Ua.ExtensionObject

ReadExtensionObjectArray() public méthode

Reads an array of extension objects from the stream.
public ReadExtensionObjectArray ( string fieldName ) : ExtensionObjectCollection
fieldName string
Résultat ExtensionObjectCollection

ReadExtensionObjectBody() public méthode

Reads the body extension object from the stream.
public ReadExtensionObjectBody ( Opc.Ua.ExpandedNodeId typeId ) : object
typeId Opc.Ua.ExpandedNodeId
Résultat object

ReadFloat() public méthode

Reads a float from the stream.
public ReadFloat ( string fieldName ) : float
fieldName string
Résultat float

ReadFloatArray() public méthode

Reads a float array from the stream.
public ReadFloatArray ( string fieldName ) : FloatCollection
fieldName string
Résultat FloatCollection

ReadGuid() public méthode

Reads a GUID from the stream.
public ReadGuid ( string fieldName ) : Uuid
fieldName string
Résultat Uuid

ReadGuidArray() public méthode

Reads a GUID array from the stream.
public ReadGuidArray ( string fieldName ) : UuidCollection
fieldName string
Résultat UuidCollection

ReadInt16() public méthode

Reads a short from the stream.
public ReadInt16 ( string fieldName ) : short
fieldName string
Résultat short

ReadInt16Array() public méthode

Reads a short array from the stream.
public ReadInt16Array ( string fieldName ) : Int16Collection
fieldName string
Résultat Int16Collection

ReadInt32() public méthode

Reads an int from the stream.
public ReadInt32 ( string fieldName ) : int
fieldName string
Résultat int

ReadInt32Array() public méthode

Reads a int array from the stream.
public ReadInt32Array ( string fieldName ) : Int32Collection
fieldName string
Résultat Int32Collection

ReadInt64() public méthode

Reads a long from the stream.
public ReadInt64 ( string fieldName ) : long
fieldName string
Résultat long

ReadInt64Array() public méthode

Reads a long array from the stream.
public ReadInt64Array ( string fieldName ) : Int64Collection
fieldName string
Résultat Int64Collection

ReadLocalizedText() public méthode

Reads an LocalizedText from the stream.
public ReadLocalizedText ( string fieldName ) : Opc.Ua.LocalizedText
fieldName string
Résultat Opc.Ua.LocalizedText

ReadLocalizedTextArray() public méthode

Reads an LocalizedText array from the stream.
public ReadLocalizedTextArray ( string fieldName ) : LocalizedTextCollection
fieldName string
Résultat LocalizedTextCollection

ReadNodeId() public méthode

Reads an NodeId from the stream.
public ReadNodeId ( string fieldName ) : Opc.Ua.NodeId
fieldName string
Résultat Opc.Ua.NodeId

ReadNodeIdArray() public méthode

Reads an NodeId array from the stream.
public ReadNodeIdArray ( string fieldName ) : NodeIdCollection
fieldName string
Résultat NodeIdCollection

ReadQualifiedName() public méthode

Reads an QualifiedName from the stream.
public ReadQualifiedName ( string fieldName ) : Opc.Ua.QualifiedName
fieldName string
Résultat Opc.Ua.QualifiedName

ReadQualifiedNameArray() public méthode

Reads an QualifiedName array from the stream.
public ReadQualifiedNameArray ( string fieldName ) : QualifiedNameCollection
fieldName string
Résultat QualifiedNameCollection

ReadSByte() public méthode

Reads a sbyte from the stream.
public ReadSByte ( string fieldName ) : sbyte
fieldName string
Résultat sbyte

ReadSByteArray() public méthode

Reads a sbyte array from the stream.
public ReadSByteArray ( string fieldName ) : SByteCollection
fieldName string
Résultat SByteCollection

ReadStartElement() public méthode

Returns the qualified name for the next element in the stream.
public ReadStartElement ( ) : void
Résultat void

ReadStatusCode() public méthode

Reads an StatusCode from the stream.
public ReadStatusCode ( string fieldName ) : Opc.Ua.StatusCode
fieldName string
Résultat Opc.Ua.StatusCode

ReadStatusCodeArray() public méthode

Reads an StatusCode array from the stream.
public ReadStatusCodeArray ( string fieldName ) : StatusCodeCollection
fieldName string
Résultat StatusCodeCollection

ReadString() public méthode

Reads a string from the stream.
public ReadString ( string fieldName ) : string
fieldName string
Résultat string

ReadStringArray() public méthode

Reads a string array from the stream.
public ReadStringArray ( string fieldName ) : StringCollection
fieldName string
Résultat StringCollection

ReadUInt16() public méthode

Reads a ushort from the stream.
public ReadUInt16 ( string fieldName ) : ushort
fieldName string
Résultat ushort

ReadUInt16Array() public méthode

Reads a ushort array from the stream.
public ReadUInt16Array ( string fieldName ) : UInt16Collection
fieldName string
Résultat UInt16Collection

ReadUInt32() public méthode

Reads a uint from the stream.
public ReadUInt32 ( string fieldName ) : uint
fieldName string
Résultat uint

ReadUInt32Array() public méthode

Reads a uint array from the stream.
public ReadUInt32Array ( string fieldName ) : UInt32Collection
fieldName string
Résultat UInt32Collection

ReadUInt64() public méthode

Reads a ulong from the stream.
public ReadUInt64 ( string fieldName ) : ulong
fieldName string
Résultat ulong

ReadUInt64Array() public méthode

Reads a ulong array from the stream.
public ReadUInt64Array ( string fieldName ) : UInt64Collection
fieldName string
Résultat UInt64Collection

ReadVariant() public méthode

Reads an Variant from the stream.
public ReadVariant ( string fieldName ) : Variant
fieldName string
Résultat Variant

ReadVariantArray() public méthode

Reads an Variant array from the stream.
public ReadVariantArray ( string fieldName ) : VariantCollection
fieldName string
Résultat VariantCollection

ReadXmlElement() public méthode

Reads an XmlElement from the stream.
public ReadXmlElement ( string fieldName ) : XmlElement
fieldName string
Résultat System.Xml.XmlElement

ReadXmlElementArray() public méthode

Reads an XmlElement array from the stream.
public ReadXmlElementArray ( string fieldName ) : XmlElementCollection
fieldName string
Résultat System.Xml.XmlElementCollection

SetMappingTables() public méthode

Initializes the tables used to map namespace and server uris during decoding.
public SetMappingTables ( Opc.Ua.NamespaceTable namespaceUris, StringTable serverUris ) : void
namespaceUris Opc.Ua.NamespaceTable The namespaces URIs referenced by the data being decoded.
serverUris StringTable The server URIs referenced by the data being decoded.
Résultat void

Skip() public méthode

Skips to the end of the specified element.
public Skip ( XmlQualifiedName qname ) : void
qname System.Xml.XmlQualifiedName The qualified name of the element to skip.
Résultat void

XmlDecoder() public méthode

Initializes the object with default values.
public XmlDecoder ( ServiceMessageContext context ) : System
context ServiceMessageContext
Résultat System

XmlDecoder() public méthode

Initializes the object with a XML reader.
public XmlDecoder ( System systemType, XmlReader reader, ServiceMessageContext context ) : System
systemType System
reader XmlReader
context ServiceMessageContext
Résultat System

XmlDecoder() public méthode

Initializes the object with an XML element to parse.
public XmlDecoder ( XmlElement element, ServiceMessageContext context ) : System
element System.Xml.XmlElement
context ServiceMessageContext
Résultat System