Esempio n. 1
0
 private void Init()
 {
     this.current    = null;
     this.state      = System.Xml.WriteState.Start;
     this.attrNames  = new StringCollection();
     this.attrValues = new StringCollection();
 }
Esempio n. 2
0
 private void Init()
 {
     this.current = null;
     this.state = System.Xml.WriteState.Start;
     this.attrNames = new StringCollection();
     this.attrValues = new StringCollection();
 }
Esempio n. 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;
        }
Esempio n. 4
0
 public void Close()
 {
     if (IsClosed)
     {
         return;
     }
     try
     {
         WriteEndDocument();
     }
     finally
     {
         try
         {
             nodeWriter.Flush();
             //nodeWriter.Close();
         }
         finally
         {
             writeState = WriteState.Closed;
             depth      = 0;
         }
     }
 }
Esempio n. 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;
        }
Esempio n. 6
0
        public void Close()
        {
            if (IsClosed)
                return;
            try
            {

                WriteEndDocument();
            }
            finally
            {
                try
                {
                    nodeWriter.Flush();
                    //nodeWriter.Close();
                }
                finally
                {
                    writeState = WriteState.Closed;
                    depth = 0;
                }
            }
        }
Esempio n. 7
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;
 }
Esempio n. 8
0
 public override void WriteStartAttribute(string prefix, string localName, string ns)
 {
     this.attrNames.Add(localName);
     this.state = System.Xml.WriteState.Attribute;
 }
Esempio n. 9
0
 public override void WriteFullEndElement()
 {
     this.Ascend();
     this.state = System.Xml.WriteState.Element;
 }
Esempio n. 10
0
 public override void WriteEndAttribute()
 {
     this.state = System.Xml.WriteState.Element;
 }
Esempio n. 11
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;
 }
Esempio n. 12
0
 public override void WriteStartAttribute(string prefix, string localName, string ns)
 {
     this.attrNames.Add(localName);
     this.state = System.Xml.WriteState.Attribute;
 }
Esempio n. 13
0
 public override void WriteFullEndElement()
 {
     this.Ascend();
     this.state = System.Xml.WriteState.Element;
 }
Esempio n. 14
0
 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;
 }