2003-03-22 Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
authorAtsushi Eno <atsushieno@gmail.com>
Sat, 22 Mar 2003 08:04:36 +0000 (08:04 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Sat, 22 Mar 2003 08:04:36 +0000 (08:04 -0000)
* XmlSerializer.cs : patch by Sean Cier. Serialize() other than
  XmlWriter argument should call WriteEndDocument.

svn path=/trunk/mcs/; revision=12741

mcs/class/System.XML/System.Xml.Serialization/ChangeLog
mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs

index 69888b08fddcafb3bfe748688b489fd3a30f717a..02916275a3493ec5ed21f082923c4e7ff680a13d 100755 (executable)
@@ -1,3 +1,8 @@
+2003-03-22  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
+
+       * XmlSerializer.cs : patch by Sean Cier. Serialize() other than 
+         XmlWriter argument should call WriteEndDocument.
+
 2003-03-19  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
 
        * XmlSerializer.cs : Serialize() don't write xmldecl when WriteState is
index d0261e97c6b2ba0e980dbc5d61af7ba7b12758a8..561bb7fd76dd6b5c21ec513da2edfc3b7aff49d8 100644 (file)
@@ -396,6 +396,8 @@ namespace System.Xml.Serialization {
                        XmlTextWriter xmlWriter = new XmlTextWriter (stream, System.Text.Encoding.Default);
                        xmlWriter.Formatting = Formatting.Indented;
                        Serialize (xmlWriter, o, null);
+                       xmlWriter.WriteEndDocument();
+                       xmlWriter.Flush();
                }
                
                public void Serialize (TextWriter textWriter, object o)
@@ -403,6 +405,8 @@ namespace System.Xml.Serialization {
                        XmlTextWriter xmlWriter = new XmlTextWriter (textWriter);
                        xmlWriter.Formatting = Formatting.Indented;
                        Serialize (xmlWriter, o, null);
+                       xmlWriter.WriteEndDocument();
+                       xmlWriter.Flush();
                }
                
                public void Serialize (XmlWriter xmlWriter, object o)
@@ -415,6 +419,8 @@ namespace System.Xml.Serialization {
                        XmlTextWriter xmlWriter = new XmlTextWriter (stream, System.Text.Encoding.Default);
                        xmlWriter.Formatting = Formatting.Indented;
                        Serialize (xmlWriter, o, namespaces);
+                       xmlWriter.WriteEndDocument();
+                       xmlWriter.Flush();
                }
                
                public void Serialize (TextWriter textWriter, object o, XmlSerializerNamespaces namespaces)
@@ -422,6 +428,8 @@ namespace System.Xml.Serialization {
                        XmlTextWriter xmlWriter = new XmlTextWriter (textWriter);
                        xmlWriter.Formatting = Formatting.Indented;
                        Serialize (xmlWriter, o, namespaces);
+                       xmlWriter.WriteEndDocument();
+                       xmlWriter.Flush();
                }
 
                public void Serialize (XmlWriter writer, object o, XmlSerializerNamespaces namespaces)