Opc.Ua.JsonEncoder.JsonEncoder C# (CSharp) Method

JsonEncoder() public method

Initializes the object with default values.
public JsonEncoder ( ServiceMessageContext context, bool useReversibleEncoding, StreamWriter writer = null ) : System
context ServiceMessageContext
useReversibleEncoding bool
writer System.IO.StreamWriter
return System
        public JsonEncoder(ServiceMessageContext context, bool useReversibleEncoding, StreamWriter writer = null)
        {
            Initialize();

            m_context = context;
            UseReversibleEncoding = useReversibleEncoding;

            if (writer == null)
            {
                m_destination = new MemoryStream();
                m_writer = new StreamWriter(m_destination, new UTF8Encoding(false));
            }

            m_writer.Write("{");
        }