Changes from code review
diff --git a/src/ProtocolBuffers.Serialization/AbstractWriter.cs b/src/ProtocolBuffers.Serialization/AbstractWriter.cs
index 7ae2686..1e087ec 100644
--- a/src/ProtocolBuffers.Serialization/AbstractWriter.cs
+++ b/src/ProtocolBuffers.Serialization/AbstractWriter.cs
@@ -12,19 +12,9 @@
     /// <summary>

     /// Provides a base class for writers that performs some basic type dispatching

     /// </summary>

-    public abstract class AbstractWriter : ICodedOutputStream, IDisposable

+    public abstract class AbstractWriter : ICodedOutputStream

     {

         /// <summary>

-        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

-        /// </summary>

-        public void Dispose()

-        {

-            GC.SuppressFinalize(this);

-            Flush();

-            Dispose(true);

-        }

-

-        /// <summary>

         /// Completes any pending write operations

         /// </summary>

         public virtual void Flush()

@@ -32,13 +22,6 @@
         }

 

         /// <summary>

-        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

-        /// </summary>

-        protected virtual void Dispose(bool disposing)

-        {

-        }

-

-        /// <summary>

         /// Writes the message to the the formatted stream.

         /// </summary>

         public abstract void WriteMessage(IMessageLite message);

diff --git a/src/ProtocolBuffers.Serialization/Http/MessageFormatOptions.cs b/src/ProtocolBuffers.Serialization/Http/MessageFormatOptions.cs
index 4ee1889..72d7371 100644
--- a/src/ProtocolBuffers.Serialization/Http/MessageFormatOptions.cs
+++ b/src/ProtocolBuffers.Serialization/Http/MessageFormatOptions.cs
@@ -8,7 +8,7 @@
     /// <summary>

     /// Defines control information for the various formatting used with HTTP services

     /// </summary>

-    public struct MessageFormatOptions

+    public class MessageFormatOptions

     {

         /// <summary>The mime type for xml content</summary>

         /// <remarks>Other valid xml mime types include: application/binary, application/x-protobuf</remarks>

diff --git a/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs b/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs
index 15e08e0..035870d 100644
--- a/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs
+++ b/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs
@@ -239,27 +239,11 @@
         /// <summary> Gets or sets the whitespace to use to separate the text, default = empty </summary>

         public string Whitespace { get; set; }

 

-        /// <summary>

-        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

-        /// </summary>

-        protected override void Dispose(bool disposing)

-        {

-            if (disposing)

-            {

-                while (_counter.Count > 1)

-                {

-                    WriteMessageEnd();

-                }

-            }

-

-            base.Dispose(disposing);

-        }

-

         private void Seperator()

         {

             if (_counter.Count == 0)

             {

-                throw new InvalidOperationException("Missmatched open/close in Json writer.");

+                throw new InvalidOperationException("Mismatched open/close in Json writer.");

             }

 

             int index = _counter.Count - 1;

diff --git a/src/ProtocolBuffers.Serialization/XmlFormatReader.cs b/src/ProtocolBuffers.Serialization/XmlFormatReader.cs
index 98b6977..bf21db5 100644
--- a/src/ProtocolBuffers.Serialization/XmlFormatReader.cs
+++ b/src/ProtocolBuffers.Serialization/XmlFormatReader.cs
@@ -14,16 +14,16 @@
     {

         public const string DefaultRootElementName = XmlFormatWriter.DefaultRootElementName;

         private readonly XmlReader _input;

-        private readonly Stack<ElementStack> _elements;

+        private readonly Stack<ElementStackEntry> _elements;

         private string _rootElementName;

 

-        private struct ElementStack

+        private struct ElementStackEntry

         {

             public readonly string LocalName;

             public readonly int Depth;

             public readonly bool IsEmpty;

 

-            public ElementStack(string localName, int depth, bool isEmpty) : this()

+            public ElementStackEntry(string localName, int depth, bool isEmpty) : this()

             {

                 LocalName = localName;

                 IsEmpty = isEmpty;

@@ -87,7 +87,7 @@
         {

             _input = input;

             _rootElementName = DefaultRootElementName;

-            _elements = new Stack<ElementStack>();

+            _elements = new Stack<ElementStackEntry>();

             Options = XmlReaderOptions.None;

         }

 

@@ -144,7 +144,7 @@
                 continue;

             }

             Assert(_input.IsStartElement() && _input.LocalName == element);

-            _elements.Push(new ElementStack(element, _input.Depth, _input.IsEmptyElement));

+            _elements.Push(new ElementStackEntry(element, _input.Depth, _input.IsEmptyElement));

             _input.Read();

         }

 

@@ -156,7 +156,7 @@
         {

             Assert(_elements.Count > 0);

 

-            ElementStack stop = _elements.Peek();

+            ElementStackEntry stop = _elements.Peek();

             while (_input.NodeType != XmlNodeType.EndElement && _input.NodeType != XmlNodeType.Element

                    && _input.Depth > stop.Depth && _input.Read())

             {

@@ -211,10 +211,10 @@
         /// </remarks>

         protected override bool PeekNext(out string field)

         {

-            ElementStack stopNode;

+            ElementStackEntry stopNode;

             if (_elements.Count == 0)

             {

-                stopNode = new ElementStack(null, _input.Depth - 1, false);

+                stopNode = new ElementStackEntry(null, _input.Depth - 1, false);

             }

             else

             {

diff --git a/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs b/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs
index 3c5cb3a..fc3f9dc 100644
--- a/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs
+++ b/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs
@@ -72,24 +72,6 @@
         }

 

         /// <summary>

-        /// Closes the underlying XmlTextWriter

-        /// </summary>

-        protected override void Dispose(bool disposing)

-        {

-            if (disposing)

-            {

-                while (_messageOpenCount > 0)

-                {

-                    WriteMessageEnd();

-                }

-

-                _output.Close();

-            }

-

-            base.Dispose(disposing);

-        }

-

-        /// <summary>

         /// Gets or sets the default element name to use when using the Merge&lt;TBuilder>()

         /// </summary>

         public string RootElementName

diff --git a/src/ProtocolBuffers.Test/TestWriterFormatJson.cs b/src/ProtocolBuffers.Test/TestWriterFormatJson.cs
index 1958df0..1a1a480 100644
--- a/src/ProtocolBuffers.Test/TestWriterFormatJson.cs
+++ b/src/ProtocolBuffers.Test/TestWriterFormatJson.cs
@@ -43,8 +43,8 @@
                 .Build();

 

             using (TextWriter output = new StringWriter())

-            using (AbstractWriter writer = JsonFormatWriter.CreateInstance(output))

             {

+                ICodedOutputStream writer = JsonFormatWriter.CreateInstance(output);

                 writer.WriteMessageStart();      //manually begin the message, output is '{'

                 

                 writer.Flush();

diff --git a/src/ProtocolBuffers.Test/TestWriterFormatXml.cs b/src/ProtocolBuffers.Test/TestWriterFormatXml.cs
index f401481..4685358 100644
--- a/src/ProtocolBuffers.Test/TestWriterFormatXml.cs
+++ b/src/ProtocolBuffers.Test/TestWriterFormatXml.cs
@@ -46,8 +46,8 @@
                 .Build();

 

             using (TextWriter output = new StringWriter())

-            using (AbstractWriter writer = XmlFormatWriter.CreateInstance(output))

             {

+                ICodedOutputStream writer = XmlFormatWriter.CreateInstance(output);

                 writer.WriteMessageStart();      //manually begin the message, output is '{'

 

                 ICodedOutputStream stream = writer;

diff --git a/src/ProtocolBuffers/CodedOutputStream.cs b/src/ProtocolBuffers/CodedOutputStream.cs
index 709082a..b9c7b58 100644
--- a/src/ProtocolBuffers/CodedOutputStream.cs
+++ b/src/ProtocolBuffers/CodedOutputStream.cs
@@ -57,7 +57,7 @@
     /// methods are taken from the protocol buffer type names, not .NET types.

     /// (Hence WriteFloat instead of WriteSingle, and WriteBool instead of WriteBoolean.)

     /// </remarks>

-    public sealed partial class CodedOutputStream : ICodedOutputStream, IDisposable

+    public sealed partial class CodedOutputStream : ICodedOutputStream

     {

         /// <summary>

         /// The buffer size used by CreateInstance(Stream).

@@ -126,18 +126,6 @@
 

         #endregion

         

-        public void Dispose()

-        {

-            if (output != null)

-            {

-                if (position > 0)

-                {

-                    Flush();

-                }

-                output.Dispose();

-            }

-        }

-

         void ICodedOutputStream.WriteMessageStart() { }

         void ICodedOutputStream.WriteMessageEnd() { Flush(); }

 

diff --git a/src/ProtocolBuffers/ICodedOutputStream.cs b/src/ProtocolBuffers/ICodedOutputStream.cs
index a686fed..8619508 100644
--- a/src/ProtocolBuffers/ICodedOutputStream.cs
+++ b/src/ProtocolBuffers/ICodedOutputStream.cs
@@ -49,7 +49,7 @@
     /// in their binary form by creating a instance via the CodedOutputStream.CreateInstance

     /// static factory.

     /// </summary>

-    public interface ICodedOutputStream : IDisposable

+    public interface ICodedOutputStream

     {

         /// <summary>

         /// Writes any message initialization data needed to the output stream