Opc.Ua.XmlDecoder.Peek C# (CSharp) Method

Peek() public method

Returns the qualified name for the next element in the stream.
public Peek ( System.Xml.XmlNodeType nodeType ) : XmlQualifiedName
nodeType System.Xml.XmlNodeType
return System.Xml.XmlQualifiedName
        public XmlQualifiedName Peek(XmlNodeType nodeType)
        {
            m_reader.MoveToContent();
            
            if (nodeType != XmlNodeType.None && nodeType != m_reader.NodeType)
            {
                return null;
            }

            return new XmlQualifiedName(m_reader.LocalName, m_reader.NamespaceURI);
        }

Same methods

XmlDecoder::Peek ( string fieldName ) : bool

Usage Example

コード例 #1
0
        /// <summary>
        /// Updates the attributes from the stream.
        /// </summary>
        /// <param name="context">The context for the system being accessed.</param>
        /// <param name="decoder">The decoder wrapping the stream to read.</param>
        public override void Update(ISystemContext context, XmlDecoder decoder)
        {
            base.Update(context, decoder);

            decoder.PushNamespace(Namespaces.OpcUaXsd);

            if (decoder.Peek("Executable"))
            {
                Executable = decoder.ReadBoolean("Executable");
            }

            if (decoder.Peek("UserExecutable"))
            {
                UserExecutable = decoder.ReadBoolean("UserExecutable");
            }

            decoder.PopNamespace();
        }
All Usage Examples Of Opc.Ua.XmlDecoder::Peek