Exemple #1
0
 private bool StateRequiresBuffer(XmlAttributePreservingWriter.AttributeTextWriter.State state)
 {
     if (state != XmlAttributePreservingWriter.AttributeTextWriter.State.Buffering)
     {
         return(state == XmlAttributePreservingWriter.AttributeTextWriter.State.ReadingAttribute);
     }
     else
     {
         return(true);
     }
 }
Exemple #2
0
 private void FlushBuffer()
 {
     if (this.writeBuffer == null)
     {
         return;
     }
     XmlAttributePreservingWriter.AttributeTextWriter.State state = this.state;
     try
     {
         this.state = XmlAttributePreservingWriter.AttributeTextWriter.State.FlushingBuffer;
         this.Write(((object)this.writeBuffer).ToString());
         this.writeBuffer = (StringBuilder)null;
     }
     finally
     {
         this.state = state;
     }
 }
Exemple #3
0
 private void ChangeState(XmlAttributePreservingWriter.AttributeTextWriter.State newState)
 {
     if (this.state == newState)
     {
         return;
     }
     XmlAttributePreservingWriter.AttributeTextWriter.State state = this.state;
     this.state = newState;
     if (this.StateRequiresBuffer(newState))
     {
         this.CreateBuffer();
     }
     else
     {
         if (!this.StateRequiresBuffer(state))
         {
             return;
         }
         this.FlushBuffer();
     }
 }
 private void FlushBuffer()
 {
     if (this.writeBuffer == null)
         return;
     XmlAttributePreservingWriter.AttributeTextWriter.State state = this.state;
     try
     {
         this.state = XmlAttributePreservingWriter.AttributeTextWriter.State.FlushingBuffer;
         this.Write(((object)this.writeBuffer).ToString());
         this.writeBuffer = (StringBuilder)null;
     }
     finally
     {
         this.state = state;
     }
 }
 private void ChangeState(XmlAttributePreservingWriter.AttributeTextWriter.State newState)
 {
     if (this.state == newState)
         return;
     XmlAttributePreservingWriter.AttributeTextWriter.State state = this.state;
     this.state = newState;
     if (this.StateRequiresBuffer(newState))
     {
         this.CreateBuffer();
     }
     else
     {
         if (!this.StateRequiresBuffer(state))
             return;
         this.FlushBuffer();
     }
 }