[Mono-bugs] [Bug 61233][Nor] New - DataSet::ExtendedProperties not written on DataSet::WriteXml

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 7 Jul 2004 07:13:56 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by dev@6wardlaw.freeserve.co.uk.

http://bugzilla.ximian.com/show_bug.cgi?id=61233

--- shadow/61233	2004-07-07 07:13:56.000000000 -0400
+++ shadow/61233.tmp.26880	2004-07-07 07:13:56.000000000 -0400
@@ -0,0 +1,74 @@
+Bug#: 61233
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dev@6wardlaw.freeserve.co.uk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DataSet::ExtendedProperties not written on DataSet::WriteXml
+
+Description of Problem:
+DataSet extended properties are not included on serialization of the 
+dataset to xml. Microsoft .Net will write these properties ( if they are 
+string based ) to the xml data. The main use I have made of this 
+functionality is to version the stored files.
+
+
+Steps to reproduce the problem:
+1. Create a data set
+
+DataSet ds = new DataSet( );
+
+2. Add custom extended property string
+
+ds.ExtendedProperties[ "version" ] = "version 2.1";
+
+3. Serialize the dataset
+
+ds.WriteXml( .... )
+
+4. Deserialise the store xml
+
+DataSet newDs = new DataSet( );
+
+newDs.ReadXml( ... )
+
+5. Get the extended property
+
+string version = (string) newDs.ExtendedProperties[ "version" ];
+
+Actual Results:
+
+NullReferenceException is thrown and inspection of the XML data reveals 
+that no extended properties exist within the structure.
+
+
+Expected Results:
+
+The version string supplied in step 2 should be returned from the call in 
+step 5. Also the XML should contain this data within its structure.
+
+
+How often does this happen? 
+
+Always
+
+
+Additional Information:
+
+Suggest adding the required functionality to:
+
+WriteXml (XmlWriter, XmlWriteMode) [System.Data.DataSet:697]
+
+This could simply make use of the ToString( ) method for any objects 
+stored. It would then be up to the user of the container to ensure that 
+the string could be interpreted as required.