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

WriteBoolean() public method

Writes a boolean to the stream.
public WriteBoolean ( string fieldName, bool value ) : void
fieldName string
value bool
return void
        public void WriteBoolean(string fieldName, bool 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_executable)
            {
                encoder.WriteBoolean("Executable", m_executable);
            }

            if (m_userExecutable)
            {
                encoder.WriteBoolean("UserExecutable", m_executable);
            }

            encoder.PopNamespace();
        }
All Usage Examples Of Opc.Ua.XmlEncoder::WriteBoolean