Author: atsushi
Date: 2008-02-11 10:25:42 -0500 (Mon, 11 Feb 2008)
New Revision: 95442
Modified:
trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog
trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XName.cs
trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs
Log:
2008-02-11 Atsushi Enomoto <[EMAIL PROTECTED]>
* XName.cs : implemented GetObjectData(). It is however incompatible
with .NET (yet?).
* XNodeNavigator.cs : SchemaInfo is null.
Modified: trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog
===================================================================
--- trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog 2008-02-11
15:12:24 UTC (rev 95441)
+++ trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog 2008-02-11
15:25:42 UTC (rev 95442)
@@ -1,5 +1,11 @@
2008-02-11 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * XName.cs : implemented GetObjectData(). It is however incompatible
+ with .NET (yet?).
+ * XNodeNavigator.cs : SchemaInfo is null.
+
+2008-02-11 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* XStreamingElement.cs : it was almost already implemented.
* XElement.cs : finish .ctor(XStreamingElement).
Modified: trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XName.cs
===================================================================
--- trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XName.cs 2008-02-11
15:12:24 UTC (rev 95441)
+++ trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XName.cs 2008-02-11
15:25:42 UTC (rev 95442)
@@ -44,6 +44,15 @@
string local;
XNamespace ns;
+ XName (SerializationInfo info, StreamingContext context)
+ {
+ string expandedName = info.GetString ("name");
+ string local, ns;
+ ExpandName (expandedName, out local, out ns);
+ this.local = local;
+ this.ns = XNamespace.Get (ns);
+ }
+
internal XName (string local, XNamespace ns)
{
this.local = XmlConvert.VerifyNCName (local);
@@ -80,9 +89,17 @@
public static XName Get (string expandedName)
{
+ string local, ns;
+ ExpandName (expandedName, out local, out ns);
+ return Get (local, ns);
+ }
+
+ static void ExpandName (string expandedName, out string local,
out string ns)
+ {
if (expandedName == null)
throw new ArgumentNullException
("expandedName");
- string ns = null, local = null;
+ ns = null;
+ local = null;
if (expandedName.Length == 0)
throw ErrorInvalidExpandedName ();
//this.expanded = expandedName;
@@ -101,7 +118,6 @@
local = expandedName;
ns = String.Empty;
}
- return Get (local, ns);
}
public static XName Get (string localName, string namespaceName)
@@ -141,10 +157,13 @@
return String.Concat ("{", ns.NamespaceName, "}",
local);
}
- [MonoTODO]
+ // in .NET it is serialized as "NameSerializer". dunno how to
create it.
void ISerializable.GetObjectData (SerializationInfo info,
StreamingContext context)
{
- throw new NotImplementedException ();
+ if (info == null)
+ throw new ArgumentNullException ("info");
+
+ info.AddValue ("name", ToString ());
}
}
}
Modified: trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs
===================================================================
--- trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs
2008-02-11 15:12:24 UTC (rev 95441)
+++ trunk/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeNavigator.cs
2008-02-11 15:25:42 UTC (rev 95442)
@@ -187,9 +187,8 @@
}
}
- [MonoTODO]
public override IXmlSchemaInfo SchemaInfo {
- get { throw new NotImplementedException (); }
+ get { return null; }
}
public override object UnderlyingObject {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches