Author: atsushi
Date: 2006-11-02 02:58:54 -0500 (Thu, 02 Nov 2006)
New Revision: 67256
Modified:
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/CodeIdentifier.cs
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/CodeIdentifiers.cs
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/SoapIncludeAttribute.cs
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/SoapReflectionImporter.cs
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlIncludeAttribute.cs
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlMappingAccess.cs
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlSerializerAssemblyAttribute.cs
branches/atsushi/mcs/class/System.XML/System.Xml_test.dll.sources
Log:
2006-11-02 Atsushi Enomoto <[EMAIL PROTECTED]>
* CodeIdentifier.cs : in 2.0 profile, .ctor() is exposed to
explicitly say Obsolete instantiation.
* CodeIdentifiers.cs : implemented case-insensitive mode.
* XmlSerializerAssemblyAttribute.cs : added missing .ctor().
* SoapIncludeAttribute.cs, XmlIncludeAttribute.cs :
in 2.0 profile it could also be applied to an interface.
* SoapReflectionImporter.cs,
XmlReflectionImporter.cs,
XmlMappingAccess.cs :
added missing ImportMembersMapping overload and moved actual
implementation to most lengthy-arglist one. To make it possible,
XmlMappingAccess is included in 1.x as internal enum.
Modified:
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
===================================================================
--- branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
2006-11-02 07:29:15 UTC (rev 67255)
+++ branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
2006-11-02 07:58:54 UTC (rev 67256)
@@ -1,5 +1,20 @@
2006-11-02 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * CodeIdentifier.cs : in 2.0 profile, .ctor() is exposed to
+ explicitly say Obsolete instantiation.
+ * CodeIdentifiers.cs : implemented case-insensitive mode.
+ * XmlSerializerAssemblyAttribute.cs : added missing .ctor().
+ * SoapIncludeAttribute.cs, XmlIncludeAttribute.cs :
+ in 2.0 profile it could also be applied to an interface.
+ * SoapReflectionImporter.cs,
+ XmlReflectionImporter.cs,
+ XmlMappingAccess.cs :
+ added missing ImportMembersMapping overload and moved actual
+ implementation to most lengthy-arglist one. To make it possible,
+ XmlMappingAccess is included in 1.x as internal enum.
+
+2006-11-02 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* XmlSchemaImporter.cs : initialize extensions from configuration.
2006-11-01 Atsushi Enomoto <[EMAIL PROTECTED]>
Modified:
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/CodeIdentifier.cs
===================================================================
---
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/CodeIdentifier.cs
2006-11-02 07:29:15 UTC (rev 67255)
+++
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/CodeIdentifier.cs
2006-11-02 07:58:54 UTC (rev 67256)
@@ -35,10 +35,12 @@
public class CodeIdentifier {
#if NET_2_0
- private CodeIdentifier ()
+ [Obsolete ("Design mistake. It only contains static methods.")]
+ public
+#endif
+ CodeIdentifier ()
{
}
-#endif
public static string MakeCamel (string identifier)
{
Modified:
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/CodeIdentifiers.cs
===================================================================
---
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/CodeIdentifiers.cs
2006-11-02 07:29:15 UTC (rev 67255)
+++
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/CodeIdentifiers.cs
2006-11-02 07:58:54 UTC (rev 67256)
@@ -38,17 +38,32 @@
#region Fields
bool useCamelCasing;
- Hashtable table = new Hashtable ();
- Hashtable reserved = new Hashtable ();
+ Hashtable table;
+ Hashtable reserved;
#endregion
#region Constructors
public CodeIdentifiers ()
+ : this (true)
{
}
+ public CodeIdentifiers (bool caseSensitive)
+ {
+#if NET_2_0
+ StringComparer c = caseSensitive ?
+ StringComparer.Ordinal :
+ StringComparer.OrdinalIgnoreCase;
+ table = new Hashtable (c);
+ reserved = new Hashtable (c);
+#else
+ table = new Hashtable ();
+ reserved = new Hashtable ();
+#endif
+ }
+
#endregion // Constructors
#region Properties
Modified:
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/SoapIncludeAttribute.cs
===================================================================
---
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/SoapIncludeAttribute.cs
2006-11-02 07:29:15 UTC (rev 67255)
+++
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/SoapIncludeAttribute.cs
2006-11-02 07:58:54 UTC (rev 67256)
@@ -32,11 +32,14 @@
namespace System.Xml.Serialization
{
- /// <summary>
- /// Summary description for SoapIncludeAttribute.
- /// </summary>
+#if NET_2_0
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct |
+ AttributeTargets.Interface | AttributeTargets.Method,
+ AllowMultiple=true)]
+#else
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct |
AttributeTargets.Method, AllowMultiple=true)]
+#endif
public class SoapIncludeAttribute : Attribute
{
private Type type;
Modified:
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/SoapReflectionImporter.cs
===================================================================
---
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/SoapReflectionImporter.cs
2006-11-02 07:29:15 UTC (rev 67255)
+++
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/SoapReflectionImporter.cs
2006-11-02 07:58:54 UTC (rev 67256)
@@ -82,6 +82,15 @@
public XmlMembersMapping ImportMembersMapping (string
elementName, string ns, XmlReflectionMember[] members, bool hasWrapperElement,
bool writeAccessors, bool validate)
{
+ return ImportMembersMapping (elementName, ns, members,
hasWrapperElement, writeAccessors, validate, XmlMappingAccess.Read |
XmlMappingAccess.Write);
+ }
+
+#if NET_2_0
+ [MonoTODO]
+ public
+#endif
+ XmlMembersMapping ImportMembersMapping (string elementName,
string ns, XmlReflectionMember[] members, bool hasWrapperElement, bool
writeAccessors, bool validate, XmlMappingAccess access)
+ {
elementName = XmlConvert.EncodeLocalName (elementName);
XmlMemberMapping[] mapping = new
XmlMemberMapping[members.Length];
for (int n=0; n<members.Length; n++)
Modified:
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlIncludeAttribute.cs
===================================================================
---
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlIncludeAttribute.cs
2006-11-02 07:29:15 UTC (rev 67255)
+++
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlIncludeAttribute.cs
2006-11-02 07:58:54 UTC (rev 67256)
@@ -32,7 +32,14 @@
namespace System.Xml.Serialization
{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct |
AttributeTargets.Method, AllowMultiple=true)]
+#if NET_2_0
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct |
+ AttributeTargets.Interface | AttributeTargets.Method,
+ AllowMultiple=true)]
+#else
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct |
+ AttributeTargets.Method, AllowMultiple=true)]
+#endif
public class XmlIncludeAttribute : Attribute
{
private Type type;
Modified:
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlMappingAccess.cs
===================================================================
---
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlMappingAccess.cs
2006-11-02 07:29:15 UTC (rev 67255)
+++
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlMappingAccess.cs
2006-11-02 07:58:54 UTC (rev 67256)
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Xml.Schema;
@@ -36,12 +35,13 @@
namespace System.Xml.Serialization
{
[Flags]
- public enum XmlMappingAccess
+#if NET_2_0
+ public
+#endif
+ enum XmlMappingAccess
{
None,
Read,
Write
}
}
-
-#endif
Modified:
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs
===================================================================
---
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs
2006-11-02 07:29:15 UTC (rev 67255)
+++
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs
2006-11-02 07:58:54 UTC (rev 67256)
@@ -106,6 +106,48 @@
XmlReflectionMember [] members,
bool hasWrapperElement)
{
+ return ImportMembersMapping (elementName, ns, members,
hasWrapperElement, true);
+ }
+
+#if NET_2_0
+ [MonoTODO]
+ public
+#endif
+ XmlMembersMapping ImportMembersMapping (string elementName,
+ string ns,
+ XmlReflectionMember[] members,
+ bool hasWrapperElement,
+ bool writeAccessors)
+ {
+ return ImportMembersMapping (elementName, ns, members,
hasWrapperElement, writeAccessors, true);
+ }
+
+#if NET_2_0
+ [MonoTODO]
+ public
+#endif
+ XmlMembersMapping ImportMembersMapping (string elementName,
+ string ns,
+ XmlReflectionMember[] members,
+ bool hasWrapperElement,
+ bool writeAccessors,
+ bool validate)
+ {
+ return ImportMembersMapping (elementName, ns, members,
hasWrapperElement, writeAccessors, validate, XmlMappingAccess.Read |
XmlMappingAccess.Write);
+ }
+
+#if NET_2_0
+ [MonoTODO ("writeAccessors, validate, mapping access")]
+ public
+#endif
+ XmlMembersMapping ImportMembersMapping (string elementName,
+ string ns,
+ XmlReflectionMember[] members,
+ bool hasWrapperElement,
+ bool writeAccessors,
+ bool validate,
+ XmlMappingAccess access)
+ {
// Reset (); Disabled. See ChangeLog
XmlMemberMapping[] mapping = new
XmlMemberMapping[members.Length];
@@ -124,29 +166,6 @@
return mps;
}
-#if NET_2_0
- [MonoTODO]
- public XmlMembersMapping ImportMembersMapping (string
elementName,
- string ns,
- XmlReflectionMember[] members,
- bool hasWrapperElement,
- bool rpc)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public XmlMembersMapping ImportMembersMapping (string
elementName,
- string ns,
- XmlReflectionMember[] members,
- bool hasWrapperElement,
- bool rpc,
- bool openModel)
- {
- throw new NotImplementedException ();
- }
-#endif
-
public XmlTypeMapping ImportTypeMapping (Type type)
{
return ImportTypeMapping (type, null, null);
Modified:
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlSerializerAssemblyAttribute.cs
===================================================================
---
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlSerializerAssemblyAttribute.cs
2006-11-02 07:29:15 UTC (rev 67255)
+++
branches/atsushi/mcs/class/System.XML/System.Xml.Serialization/XmlSerializerAssemblyAttribute.cs
2006-11-02 07:58:54 UTC (rev 67256)
@@ -40,12 +40,17 @@
string _assemblyName;
string _codeBase;
+ public XmlSerializerAssemblyAttribute ()
+ {
+ }
+
public XmlSerializerAssemblyAttribute (string assemblyName)
{
_assemblyName = assemblyName;
}
public XmlSerializerAssemblyAttribute (string assemblyName,
string codeBase)
+ : this (assemblyName)
{
_codeBase = codeBase;
}
Modified: branches/atsushi/mcs/class/System.XML/System.Xml_test.dll.sources
===================================================================
--- branches/atsushi/mcs/class/System.XML/System.Xml_test.dll.sources
2006-11-02 07:29:15 UTC (rev 67255)
+++ branches/atsushi/mcs/class/System.XML/System.Xml_test.dll.sources
2006-11-02 07:58:54 UTC (rev 67256)
@@ -53,6 +53,7 @@
System.Xml.Schema/XmlSchemaTests.cs
System.Xml.Schema/XmlSchemaTypeTests.cs
System.Xml.Schema/XmlSchemaSetTests.cs
+System.Xml.Serialization/CodeIdentifiersTests.cs
System.Xml.Serialization/ComplexDataStructure.cs
System.Xml.Serialization/DeserializeTests.cs
System.Xml.Serialization/SoapAttributeAttributeTests.cs
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches