private void Init()
 {
     this.current    = null;
     this.state      = System.Xml.WriteState.Start;
     this.attrNames  = new StringCollection();
     this.attrValues = new StringCollection();
 }
 private void Init()
 {
     this.current = null;
     this.state = System.Xml.WriteState.Start;
     this.attrNames = new StringCollection();
     this.attrValues = new StringCollection();
 }
Exemple #3
0
        private void InitializeWriter()
        {
            nodeType = JsonNodeType.None;
            dataType = JsonDataType.None;
            isWritingDataTypeAttribute   = false;
            wroteServerTypeAttribute     = false;
            isWritingServerTypeAttribute = false;
            serverTypeValue = null;
            attributeText   = null;
            depth           = 0;

            if (scopes != null && scopes.Length > 25)
            {
                scopes = null;
            }
            writeState       = WriteState.Start;
            endElementBuffer = false;
        }
Exemple #4
0
 public void Close()
 {
     if (IsClosed)
     {
         return;
     }
     try
     {
         WriteEndDocument();
     }
     finally
     {
         try
         {
             nodeWriter.Flush();
             //nodeWriter.Close();
         }
         finally
         {
             writeState = WriteState.Closed;
             depth      = 0;
         }
     }
 }
Exemple #5
0
        private void InitializeWriter()
        {
            nodeType = JsonNodeType.None;
            dataType = JsonDataType.None;
            isWritingDataTypeAttribute = false;
            wroteServerTypeAttribute = false;
            isWritingServerTypeAttribute = false;
            serverTypeValue = null;
            attributeText = null;
            depth = 0;

            if (scopes != null && scopes.Length > 25)
                scopes = null;
            writeState = WriteState.Start;
            endElementBuffer = false;
        }
Exemple #6
0
        public void Close()
        {
            if (IsClosed)
                return;
            try
            {

                WriteEndDocument();
            }
            finally
            {
                try
                {
                    nodeWriter.Flush();
                    //nodeWriter.Close();
                }
                finally
                {
                    writeState = WriteState.Closed;
                    depth = 0;
                }
            }
        }
 public override void WriteStartElement(string prefix, string localName, string ns)
 {
     this.Descend();
     this.name  = ((prefix != null) && (prefix.Length > 0)) ? (prefix + ":" + localName) : localName;
     this.state = System.Xml.WriteState.Element;
 }
 public override void WriteStartAttribute(string prefix, string localName, string ns)
 {
     this.attrNames.Add(localName);
     this.state = System.Xml.WriteState.Attribute;
 }
 public override void WriteFullEndElement()
 {
     this.Ascend();
     this.state = System.Xml.WriteState.Element;
 }
 public override void WriteEndAttribute()
 {
     this.state = System.Xml.WriteState.Element;
 }
 public override void WriteStartElement(string prefix, string localName, string ns)
 {
     this.Descend();
     this.name = ((prefix != null) && (prefix.Length > 0)) ? (prefix + ":" + localName) : localName;
     this.state = System.Xml.WriteState.Element;
 }
 public override void WriteStartAttribute(string prefix, string localName, string ns)
 {
     this.attrNames.Add(localName);
     this.state = System.Xml.WriteState.Attribute;
 }
 public override void WriteFullEndElement()
 {
     this.Ascend();
     this.state = System.Xml.WriteState.Element;
 }
 public override void WriteEndAttribute()
 {
     this.state = System.Xml.WriteState.Element;
 }
 public override void Close()
 {
     if (!this.IsClosed)
     {
         try
         {
             this.WriteEndDocument();
         }
         finally
         {
             try
             {
                 this.nodeWriter.Flush();
                 this.nodeWriter.Close();
             }
             finally
             {
                 this.writeState = System.Xml.WriteState.Closed;
                 if (this.depth != 0)
                 {
                     this.depth = 0;
                 }
             }
         }
     }
 }
 private void InitializeWriter()
 {
     this.nodeType = JsonNodeType.None;
     this.dataType = JsonDataType.None;
     this.isWritingDataTypeAttribute = false;
     this.wroteServerTypeAttribute = false;
     this.isWritingServerTypeAttribute = false;
     this.serverTypeValue = null;
     this.attributeText = null;
     if (this.depth != 0)
     {
         this.depth = 0;
     }
     if ((this.scopes != null) && (this.scopes.Length > 0x19))
     {
         this.scopes = null;
     }
     this.writeState = System.Xml.WriteState.Start;
     this.endElementBuffer = false;
 }