Opc.Ua.XmlEncoder.WriteByte C# (CSharp) Method

WriteByte() public method

Writes a byte to the stream.
public WriteByte ( string fieldName, byte value ) : void
fieldName string
value byte
return void
        public void WriteByte(string fieldName, byte value)
        {            
            if (BeginField(fieldName, false, false))
            {
                m_writer.WriteValue(value);
                EndField(fieldName);
            }
        }
        

Usage Example

コード例 #1
0
        /// <summary>
        /// Saves the attributes from the stream.
        /// </summary>
        /// <param name="context">The context for the system being accessed.</param>
        /// <param name="encoder">The encoder wrapping the stream to write.</param>
        public override void Save(ISystemContext context, XmlEncoder encoder)
        {
            base.Save(context, encoder);

            encoder.PushNamespace(Namespaces.OpcUaXsd);

            if (m_eventNotifier != 0)
            {
                encoder.WriteByte("EventNotifier", m_eventNotifier);
            }

            if (m_containsNoLoops)
            {
                encoder.WriteBoolean("ContainsNoLoops", m_containsNoLoops);
            }

            encoder.PopNamespace();
        }