Bläddra i källkod

* MapCodeGenerator.cs: CreateFieldMember now adds the field to the class,
no need to add it after the call.
* SoapSchemaImporter.cs: Implemented 2.0 constructors.

svn path=/trunk/mcs/; revision=31480

Lluis Sanchez 21 år sedan
förälder
incheckning
65bd7e1e63

+ 6 - 0
mcs/class/System.XML/System.Xml.Serialization/ChangeLog

@@ -1,3 +1,9 @@
+2004-07-26  Lluis Sanchez Gual  <[email protected]>
+
+	* MapCodeGenerator.cs: CreateFieldMember now adds the field to the class,
+	  no need to add it after the call.
+	* SoapSchemaImporter.cs: Implemented 2.0 constructors.
+
 2004-07-23  Lluis Sanchez Gual  <[email protected]>
 
 	* CodeGenerationOptions.cs: Made the class internal for the 1.1 profile.

+ 1 - 2
mcs/class/System.XML/System.Xml.Serialization/MapCodeGenerator.cs

@@ -259,7 +259,7 @@ namespace System.Xml.Serialization {
 		{
 			CodeMemberField codeField = null;
 			CodeTypeMember codeProp = null;
-
+			
 			if ((options & CodeGenerationOptions.GenerateProperties) > 0) {
 				string field = CodeIdentifier.MakeCamel (name + "Field");
 				codeField = new CodeMemberField (type, field);
@@ -388,7 +388,6 @@ namespace System.Xml.Serialization {
 		{
 			CodeTypeMember codeField = CreateFieldMember (codeClass, member.TypeData, member.Name);
 			codeField.Attributes = MemberAttributes.Public;
-			codeClass.Members.Add (codeField);
 			
 			CodeAttributeDeclarationCollection attributes = new CodeAttributeDeclarationCollection ();
 			AddArrayAttributes (attributes, member, defaultNamespace, false);

+ 6 - 3
mcs/class/System.XML/System.Xml.Serialization/SoapSchemaImporter.cs

@@ -62,20 +62,23 @@ namespace System.Xml.Serialization
 
 #if NET_2_0
 
-		[MonoTODO]
 		public SoapSchemaImporter (XmlSchemas schemas, CodeGenerationOptions options, ImportContext context)
 		{
+			_importer = new XmlSchemaImporter (schemas, options, context);
+			_importer.UseEncodedFormat = true;
 		}
 		
-		[MonoTODO]
 		public SoapSchemaImporter (XmlSchemas schemas, CodeIdentifiers typeIdentifiers, CodeGenerationOptions options)
 		{
+			_importer = new XmlSchemaImporter (schemas, typeIdentifiers, options);
+			_importer.UseEncodedFormat = true;
 		}
 		
-		[MonoTODO]
 		public SoapSchemaImporter (XmlSchemas schemas,CodeGenerationOptions options, 
 									ICodeGenerator codeGenerator, ImportContext context)
 		{
+			_importer = new XmlSchemaImporter (schemas, options, codeGenerator, context);
+			_importer.UseEncodedFormat = true;
 		}
 
 #endif