From e47dababcf65e1a1807267acc3fe5458b879eb8d Mon Sep 17 00:00:00 2001 From: Duncan Mak Date: Tue, 23 Jul 2002 10:55:14 +0000 Subject: 2002-07-23 Duncan Mak * SoapFormatter.cs: This implements IFormatter and IRemoteFormatter. * XmlSchemaException.cs: Partiall implement the ISerializable methods. It's not clear now SourceSchemaObject should be deserialized. * XmlConvert.cs: Implement the ToDateTime method. ToDateTime (string, string []) is particularly strange. * XmlException.cs: Remember to call the base serialization constructor. * XmlNodeReader.cs: Keep a new variable to store the Depth. svn path=/trunk/mcs/; revision=6077 --- mcs/class/System.XML/System.Xml/ChangeLog | 10 ++++++++++ mcs/class/System.XML/System.Xml/XmlConvert.cs | 14 +++++++------- mcs/class/System.XML/System.Xml/XmlException.cs | 1 + mcs/class/System.XML/System.Xml/XmlNodeReader.cs | 5 +++-- 4 files changed, 21 insertions(+), 9 deletions(-) (limited to 'mcs/class/System.XML/System.Xml') diff --git a/mcs/class/System.XML/System.Xml/ChangeLog b/mcs/class/System.XML/System.Xml/ChangeLog index a1272241e7c..661fcb3cbdc 100644 --- a/mcs/class/System.XML/System.Xml/ChangeLog +++ b/mcs/class/System.XML/System.Xml/ChangeLog @@ -1,3 +1,13 @@ +2002-07-23 Duncan Mak + + * XmlConvert.cs: Implement the ToDateTime method. ToDateTime + (string, string []) is particularly strange. + + * XmlException.cs: Remember to call the base serialization + constructor. + + * XmlNodeReader.cs: Keep a new variable to store the Depth. + 2002-07-14 Jason Diamond * XmlAttribute.cs: Removed ownerElement field since we can reuse diff --git a/mcs/class/System.XML/System.Xml/XmlConvert.cs b/mcs/class/System.XML/System.Xml/XmlConvert.cs index 5db6afcfe87..5c3e278b9b4 100755 --- a/mcs/class/System.XML/System.Xml/XmlConvert.cs +++ b/mcs/class/System.XML/System.Xml/XmlConvert.cs @@ -60,25 +60,25 @@ namespace System.Xml { public static char ToChar(string s) { - return char.Parse(s); + return Char.Parse(s); } - [MonoTODO] public static DateTime ToDateTime(string s) { - throw new NotImplementedException(); + return DateTime.Parse(s); } - [MonoTODO] public static DateTime ToDateTime(string s, string format) { - throw new NotImplementedException(); + DateTimeFormatInfo d = new DateTimeFormatInfo(); + d.FullDateTimePattern = format; + return DateTime.Parse(s, d); } - + [MonoTODO] public static DateTime ToDateTime(string s, string[] formats) { - throw new NotImplementedException(); + return DateTime.Parse(s); } public static Decimal ToDecimal(string s) diff --git a/mcs/class/System.XML/System.Xml/XmlException.cs b/mcs/class/System.XML/System.Xml/XmlException.cs index a9e291fbe93..f6efec719ad 100755 --- a/mcs/class/System.XML/System.Xml/XmlException.cs +++ b/mcs/class/System.XML/System.Xml/XmlException.cs @@ -32,6 +32,7 @@ namespace System.Xml } protected XmlException (SerializationInfo info, StreamingContext context) + : base (info, context) { this.lineNumber = info.GetInt32 ("lineNumber"); this.linePosition = info.GetInt32 ("linePosition"); diff --git a/mcs/class/System.XML/System.Xml/XmlNodeReader.cs b/mcs/class/System.XML/System.Xml/XmlNodeReader.cs index 8bfd1013ad7..b05a2e1814e 100755 --- a/mcs/class/System.XML/System.Xml/XmlNodeReader.cs +++ b/mcs/class/System.XML/System.Xml/XmlNodeReader.cs @@ -19,6 +19,7 @@ namespace System.Xml XmlNode current; ReadState state = ReadState.Initial; + int depth; public XmlNodeReader (XmlNode node) { @@ -43,9 +44,8 @@ namespace System.Xml get { return false; } } - [MonoTODO] public override int Depth { - get { return 0; } + get { return depth; } } [MonoTODO] @@ -88,6 +88,7 @@ namespace System.Xml } } + [MonoTODO] public override bool IsEmptyElement { get { if (current.NodeType == XmlNodeType.Entity && -- cgit v1.2.3