Author: kostat
Date: 2007-05-15 11:06:32 -0400 (Tue, 15 May 2007)
New Revision: 77417

Modified:
   branches/mainsoft/gh20/mcs/class/System.Data/System.Data/ChangeLog
   branches/mainsoft/gh20/mcs/class/System.Data/System.Data/DataTable.cs
Log:
merge -r77415:77416

Modified: branches/mainsoft/gh20/mcs/class/System.Data/System.Data/ChangeLog
===================================================================
--- branches/mainsoft/gh20/mcs/class/System.Data/System.Data/ChangeLog  
2007-05-15 15:03:30 UTC (rev 77416)
+++ branches/mainsoft/gh20/mcs/class/System.Data/System.Data/ChangeLog  
2007-05-15 15:06:32 UTC (rev 77417)
@@ -1,3 +1,7 @@
+2007-05-07  Konstantin Triger <[EMAIL PROTECTED]>
+
+       * DataTable.cs: ensure the file is closed in 
DataTable.WriteXml(filename).
+
 2007-05-07  Adar Wesley <[EMAIL PROTECTED]>
 
        * ConstraintCollection.cs: added CopyTo method with strongly typed 
Constraint[] 

Modified: branches/mainsoft/gh20/mcs/class/System.Data/System.Data/DataTable.cs
===================================================================
--- branches/mainsoft/gh20/mcs/class/System.Data/System.Data/DataTable.cs       
2007-05-15 15:03:30 UTC (rev 77416)
+++ branches/mainsoft/gh20/mcs/class/System.Data/System.Data/DataTable.cs       
2007-05-15 15:06:32 UTC (rev 77417)
@@ -2462,9 +2462,15 @@
 #if NET_2_0
                private XmlWriterSettings GetWriterSettings ()
                {
+                       return GetWriterSettings (false);
+               }
+
+               private XmlWriterSettings GetWriterSettings (bool closeOutput)
+               {
                        XmlWriterSettings s = new XmlWriterSettings ();
                        s.Indent = true;
                        s.OmitXmlDeclaration = true;
+                       s.CloseOutput = closeOutput;
                        return s;
                }
 
@@ -2537,7 +2543,7 @@
                {
                        XmlWriter xw = null;
                        try {
-                               xw = XmlWriter.Create (fileName, 
GetWriterSettings ());
+                               xw = XmlWriter.Create (fileName, 
GetWriterSettings (true));
                                WriteXml (xw, mode, writeHierarchy);
                        } finally {
                                if (xw != null)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to