Author: atsushi
Date: 2007-02-19 08:00:08 -0500 (Mon, 19 Feb 2007)
New Revision: 73112

Modified:
   trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
   
trunk/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs
Log:
2007-02-19  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * SerializationCodeGenerator.cs : hooks won't work unless they are
          set. For WriteStartElement() it could simply embed the names.



Modified: trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog       
2007-02-19 12:49:38 UTC (rev 73111)
+++ trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog       
2007-02-19 13:00:08 UTC (rev 73112)
@@ -1,3 +1,8 @@
+2007-02-19  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+       * SerializationCodeGenerator.cs : hooks won't work unless they are
+         set. For WriteStartElement() it could simply embed the names.
+
 2007-02-14  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * XmlTypeMapMember.cs : don't use readonly [Foo]Specified property

Modified: 
trunk/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs
===================================================================
--- 
trunk/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs
   2007-02-19 12:49:38 UTC (rev 73111)
+++ 
trunk/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs
   2007-02-19 13:00:08 UTC (rev 73112)
@@ -619,8 +619,6 @@
                        SetHookVar ("$TYPE", typeMap.TypeData.CSharpName);
                        SetHookVar ("$FULLTYPE", 
typeMap.TypeData.CSharpFullName);
                        SetHookVar ("$OBJECT", "ob");
-                       SetHookVar ("$ELEMENT", "element");
-                       SetHookVar ("$NAMESPACE", "namesp");
                        SetHookVar ("$NULLABLE", "isNullable");
 
                        if (GenerateWriteHook (HookType.type, 
typeMap.TypeData.Type))
@@ -691,7 +689,7 @@
                        if (typeMap.TypeData.Type == typeof (object)) {
                                WriteLineInd ("else {");
                                WriteLineInd ("if (ob.GetType().IsArray && 
typeof(XmlNode).IsAssignableFrom(ob.GetType().GetElementType())) {");
-                               WriteLine ("Writer.WriteStartElement ($ELEMENT, 
$NAMESPACE);");
+                               WriteLine ("Writer.WriteStartElement (" + 
GetLiteral (typeMap.ElementName) + ", " + GetLiteral (typeMap.Namespace) + 
");");
                                WriteLineInd ("foreach (XmlNode node in 
(System.Collections.IEnumerable) ob)");
                                WriteLineUni ("node.WriteTo (Writer);");
                                WriteLineUni ("Writer.WriteEndElement ();");

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

Reply via email to