Ejemplo n.º 1
0
 /// <summary>
 ///   Initializes a new instance of the <see cref = "T:XmppStreamParser" /> class.
 /// </summary>
 /// <param name = "stream">The stream.</param>
 public XmppStreamParser(XmppMemoryStream stream)
 {
     this.stream = stream;
     reader      = new BinaryReader(this.stream, Encoding.UTF8);
     node        = new StringBuilder();
     currentTag  = new StringBuilder();
 }
Ejemplo n.º 2
0
 /// <summary>
 ///   Initializes a new instance of the <see cref = "T:XmppStreamParser" /> class.
 /// </summary>
 /// <param name = "stream">The stream.</param>
 public XmppStreamParser(XmppMemoryStream stream)
 {
     this.stream = stream;
     reader = new BinaryReader(this.stream, Encoding.UTF8);
     node = new StringBuilder();
     currentTag = new StringBuilder();
 }
Ejemplo n.º 3
0
        /// <summary>
        ///   Disposes the specified disposing.
        /// </summary>
        /// <param name = "disposing">if set to <c>true</c> [disposing].</param>
        private void Dispose(bool disposing)
        {
            if (!isDisposed)
            {
                if (disposing)
                {
                    // Release managed resources here
                    depth      = 0;
                    currentTag = null;
                    node       = null;
                    nodeName   = null;
                    if (reader != null)
                    {
                        reader.Close();
                        reader = null;
                    }
                    if (stream != null)
                    {
                        stream.Dispose();
                        stream = null;
                    }
                }

                // Call the appropriate methods to clean up
                // unmanaged resources here.
                // If disposing is false,
                // only the following code is executed.
            }

            isDisposed = true;
        }
Ejemplo n.º 4
0
        /// <summary>
        ///   Disposes the specified disposing.
        /// </summary>
        /// <param name = "disposing">if set to <c>true</c> [disposing].</param>
        private void Dispose(bool disposing)
        {
            if (!isDisposed)
            {
                if (disposing)
                {
                    // Release managed resources here
                    depth = 0;
                    currentTag = null;
                    node = null;
                    nodeName = null;
                    if (reader != null)
                    {
                        reader.Close();
                        reader = null;
                    }
                    if (stream != null)
                    {
                        stream.Dispose();
                        stream = null;
                    }
                }

                // Call the appropriate methods to clean up
                // unmanaged resources here.
                // If disposing is false,
                // only the following code is executed.
            }

            isDisposed = true;
        }