505 Commits
Author SHA1 Message Date
Atsushi Eno b47effcc21 2006-11-08 Atsushi Enomoto <[email protected]>
* XmlSchemaImporter.cs : ImportTypeMapping() raises exception when
	  the argument name is not bound to any elements.

	* XmlSchemaImporterTests.cs : added ImportTypeMapping() test for
	  nonexistent name.


svn path=/trunk/mcs/; revision=67560
2006-11-09 02:11:40 +00:00
Atsushi Eno 70273cd0f3 2006-11-07 Atsushi Enomoto <[email protected]>
* XmlCustomFormatter.cs : consider null base64 byte array value.
	  Fixed bug #79805.


svn path=/trunk/mcs/; revision=67476
2006-11-07 18:21:49 +00:00
Atsushi Eno 112c1993e5 eol-style:native
svn path=/trunk/mcs/; revision=67475
2006-11-07 18:19:47 +00:00
Atsushi Eno 987f8c63e2 merge r67228-r67235, r67237, r67251 and r67256-67259 to trunk (they are
non-breaking parts yet).

svn path=/trunk/mcs/; revision=67473
2006-11-07 18:14:55 +00:00
Atsushi Eno 3240603b89 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.


svn path=/branches/atsushi/mcs/; revision=67256
2006-11-02 07:58:54 +00:00
Atsushi Eno c6b89558b4 2006-11-02 Atsushi Enomoto <[email protected]>
* XmlSchemaImporter.cs : initialize extensions from configuration.


svn path=/branches/atsushi/mcs/; revision=67251
2006-11-02 01:50:30 +00:00
Atsushi Eno 658311053b eol-style:native
svn path=/branches/atsushi/mcs/; revision=67237
2006-11-01 20:12:00 +00:00
Atsushi Eno 732496f334 2006-11-01 Atsushi Enomoto <[email protected]>
* Makefile : Now it supports (and expects) cyclic build. You need
	  another System.XML iteration in mcs/class/Makefile.
	* System.Xml.dll.sources : moved extension classes, added config and
	  XmlSchemaEnumerator.cs and removed IXmlSerializerImplementation.cs.


svn path=/branches/atsushi/mcs/; revision=67234
2006-11-01 20:02:15 +00:00
Atsushi Eno b59644a293 as well :p
svn path=/branches/atsushi/mcs/; revision=67233
2006-11-01 19:57:19 +00:00
Atsushi Eno 8db245f202 2006-11-01 Atsushi Enomoto <[email protected]>
* XmlSerializationGeneratedCode.cs : removed InternalSyncObject.
	* SerializationCodeGenerator.cs : since IXmlSerializerImplementation
	  became a class, it needs explicit "override".
	  Since InternalSyncObject is gone, it needs another lock target.
	* IXmlSerializerImplementation.cs : removed.
	* XmlSerializerImplementation.cs : added.
	* XmlSerializer.cs : removed extra GenerateSerializer() overloads.
	  IXmlSerializerImplementation -> XmlSerializerImplementation.
	* XmlSchemas.cs : removed Schemas. hacked Compile().
	  Now it implements IEnumerable<XmlSchema>.
	* XmlSchemaEnumerator.cs : added missing type.


svn path=/branches/atsushi/mcs/; revision=67230
2006-11-01 19:52:06 +00:00
Atsushi Eno 42ddd7a0cd 2006-11-01 Atsushi Enomoto <[email protected]>
* XmlAttributeEventArgs.cs : added ExpectedAttributes. Note that it
	  is not considered in XmlSerializationReader yet.
	* XmlElementEventArgs.cs : added ExpectedElements. Note that it
	  is not considered in XmlSerializationReader yet.
	* XmlSerializationReader.cs : added some overloads for 
	  UnknownElement()/-Attribute()/-Node().


svn path=/branches/atsushi/mcs/; revision=67229
2006-11-01 19:46:55 +00:00
Atsushi Eno 803b5ed83b 2006-11-01 Atsushi Enomoto <[email protected]>
* CodeGenerationOptions.cs : [XmlEnum], [XmlIgnore] and
	  [Serializable].
	* XmlSerializationCollectionFixupCallback.cs,
	  XmlNodeEventHandler.cs,
	  XmlSerializationReadCallback.cs,
	  UnreferencedObjectEventHandler.cs,
	  XmlSerializationWriteCallback.cs,
	  XmlAttributeEventHandler.cs,
	  XmlElementEventHandler.cs,
	  XmlSerializationFixupCallback.cs :
	  exclude [Serializable] in NET_2_0.
	* XmlSerializerNamespaces.cs : removed beta-only AddInternal().
	* XmlSerializerVersionAttribute.cs : removed [Obsolete].
	* XmlMappingAccess.cs : it is [Flags].
	* SchemaImporter.cs : implement Extensions.
	* XmlAnyElementAttribute.cs,
	  XmlArrayAttribute.cs : added Order.
	  Note that it is not considered in XmlSerializer yet.


svn path=/branches/atsushi/mcs/; revision=67228
2006-11-01 19:45:33 +00:00
Ankit Jain 420698f9cb * SerializationCodeGenerator.cs (GenerateContract): Handle
'generateAsInternal' config option.

svn path=/trunk/mcs/; revision=66987
2006-10-25 23:46:54 +00:00
Gert Driesen 5a4fcc6e61 * XmlSerializerTests.cs: Added a few tests. Fixed coding style.
* XmlSerializer.cs: Output namespace declarations in same order as MS.

svn path=/trunk/mcs/; revision=66530
2006-10-10 19:54:54 +00:00
Gert Driesen b5eb88c87f * DeserializeTest.cs: Added several tests.
* XmlSerializerTestClasses.cs: Added test classes for encoded SOAP.
* XmlSerializerTests.cs: Added new tests and fixed existing test.
* XmlReflectionImporterTests.cs: Added test for invalid default
values.
* SoapReflectionImporterTests.cs: Fixed numbering of tests.
* XmlSerializer.cs: Corrected exception message when deserialization
fails.
* SerializationCodeGenerator.cs: Added support for flag enums.
* XmlReflectionImporter.cs: Use InvalidOperationException wrapper for
all exceptions that occur while reflecting member. Validate default
values to match MS.
* SoapReflectionImporter.cs: Revert small part of previous patch as
XmlSerializer expects enum value.

svn path=/trunk/mcs/; revision=66524
2006-10-10 17:53:49 +00:00
Gert Driesen 337a3e41c9 * SoapReflectionImporterTests.cs: Added tests for bug #78206.
* SoapReflectionImporter.cs: To match MS.NET, let exceptions that are
thrown during creation of map member bubble up. Only allow
SoapAttribute on primitive types and enums. Obtain default value for
attribute members.

svn path=/trunk/mcs/; revision=66139
2006-10-01 07:42:11 +00:00
Vladimir Krasnov 213bc960d4 * XmlTypeAttribute.cs: added property AnonymousType for 2.0
svn path=/trunk/mcs/; revision=65699
2006-09-20 07:47:03 +00:00
Lluis Sanchez 970ce239a2 2006-09-12 Lluis Sanchez Gual <[email protected]>
* System.Xml.Serialization/XmlSchemaImporter.cs: Added null check.


svn path=/trunk/mcs/; revision=65297
2006-09-12 12:01:03 +00:00
Andrew Skiba 9d6b8f8be9 ifdef TARGET_JVM
svn path=/trunk/mcs/; revision=65234
2006-09-11 15:07:26 +00:00
Lluis Sanchez dfc80e20d5 2006-09-05 Lluis Sanchez Gual <[email protected]>
* XmlSchemaImporter.cs: In MS.NET 2.0, simple type arrays are mapped
	to strings. Make sure maps returned by ImportClassSimpleType are always
	simple type maps. All this fixes bug #77585.


svn path=/trunk/mcs/; revision=65021
2006-09-06 17:52:53 +00:00
Lluis Sanchez d502f1f791 svn path=/trunk/mcs/; revision=64926 2006-09-05 11:42:28 +00:00
Kornél Pál 133ce64e0f Use assembly name and file version constants.
svn path=/trunk/mcs/; revision=64391
2006-08-25 20:32:53 +00:00
Konstantin Triger fb22f7e715 enable compilation using ms csc compiler
svn path=/trunk/mcs/; revision=63412
2006-08-06 14:14:12 +00:00
Atsushi Eno b3cbbff9ce 2006-07-24 Atsushi Enomoto <[email protected]>
In class/System.XML:
	* System.Xml.dll.sources : added XmlMappingAccess.

	* XmlMappingAccess.cs : new type in 2.0 RTM.
	* XmlCodeExporter.cs, SoapCodeExporter.cs,
	  MapCodeGenerator.cs,
	  XmlSchemaImporter.cs, SoapSchemaImporter.cs, SchemaImporter.cs,
	  SchemaImporterExtension.cs, SchemaImporterExtensionCollection.cs,
	  XmlMemberMapping.cs, XmlSerializationReader.cs :
	  several 2.0 API fixes from betas to RTM.

	In class/System.Web.Services:
	* ProtocolImporter.cs, ServiceDescriptionImporter.cs :
	  some 2.0 API fixes from betas to RTM.

	In tools/wsdl:
	* MonoWSDL2.cs : 2.0 API fixes from beta2 to RTM.


svn path=/trunk/mcs/; revision=62910
2006-07-24 10:50:58 +00:00
Lluis Sanchez cc62d11431 2006-06-07 Lluis Sanchez Gual <[email protected]>
* XmlTypeMapMember.cs: Added GlobalIndex property.
	* XmlTypeMapping.cs: When adding a member, initialize its GlobalIndex
	  property.
	* SerializationCodeGenerator.cs:
	* XmlSerializationWriterInterpreter.cs:
	* XmlSerializationReaderInterpreter.cs: Use GlobalIndex instead of
	  Index to get/set the values from the input array, since some Index
	  values are shared between attribute and element members. Fixes
	  bug #78562.


svn path=/trunk/mcs/; revision=61531
2006-06-07 14:33:48 +00:00
Atsushi Eno 61ab44349c 2006-05-30 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs,
	  XmlSerializerReaderInterpreter.cs : handle CDATA section as text
	  node. Fixed bug #78536.

	* XmlSerializerTests.cs : added tailored version of bug #78536 test.


svn path=/trunk/mcs/; revision=61294
2006-05-31 01:38:24 +00:00
Gert Driesen 0913889260 * XmlCodeExporterTests.cs: Added tests for arrays. Fixed usage of
XmlRootAttribute in tests.
* XmlCodeExporter.cs: Added bool argument to GenerateClass and
GenerateEnum methods that specifies whether we're dealing with a type
for a top-level element. In GenerateClass, do not always add Namespace
argument for XmlRootAttribute if isTopLevel is false, and do not
emit XmlRootAttribute if isTopLevel is false and no arguments have been
added.
* SoapCodeExporter.cs: Added bool argument to GenerateClass and
GenerateEnum methods.
* MapCodeGenerator.cs: Added bool argument to GenerateClass and
GenerateEnum methods.

svn path=/trunk/mcs/; revision=60710
2006-05-15 15:53:35 +00:00
Lluis Sanchez 0c92696ca1 2006-05-03 Lluis Sanchez Gual <[email protected]>
* SerializationCodeGenerator.cs: Allow generating serializer for
	  reading an XmlElement or XmlDocument as root element.
	  Properly generate jagged array creation.


svn path=/trunk/mcs/; revision=60207
2006-05-03 09:24:04 +00:00
Atsushi Eno 5de22fa983 2006-04-28 Atsushi Enomoto <[email protected]>
* XmlSerializationWriter.cs : fix cosmetic typo (bug #78228).


svn path=/trunk/mcs/; revision=60028
2006-04-28 06:58:11 +00:00
Gert Driesen 2bfaa4cc5c * DeserializeTests.cs: Improved TestDeserialize_Enum test for
bug #78204.
* SerializationCodeGenerator.cs: For flag enums, we should split on all
whitespace chars instead of only on blanks.
* XmlTypeMapping.cs: Same. Added ToEnum method for converting from
constant name(s) to integral enum value.

svn path=/trunk/mcs/; revision=59918
2006-04-26 09:56:45 +00:00
Gert Driesen a99e0e1f9b * SoapAttributesTests.cs: Added tests for bug #78205.
* XmlSerializerTestClasses.cs: Added test classes and improved existing
classes for usage in upcoming bug reports.
* System.Xml_test.dll.sources: Added Test/System.Xml.Serialization/
SoapAttributesTests.cs.
* SoapAttributes.cs: The DefaultValueAttribute.Value should be returned
as SoapDefaultValue instead of the attribute itself. Fixes bug #78205.

svn path=/trunk/mcs/; revision=59917
2006-04-26 09:34:18 +00:00
Gert Driesen 62d8571061 * XmlSchemaExporter.cs: Introduce XmlSchemaObjectContainer class to
allow XML Schema items to be added to its parent in the same order
as MS.NET (schema elements before complex types, ...).
* XmlSchemaExporterTests.cs: Enabled tests which failed due to bug
#78145.

svn path=/trunk/mcs/; revision=59804
2006-04-24 10:27:55 +00:00
Gert Driesen a392bb4584 * XmlCodeExporterTests.cs: Enabled tests for XmlCodeExporter.
* XmlSchemaImporterTests.cs: Fixed EnumSimpleContent test to pass
on MS.NET 2.0.
* XmlCodeExporter.cs: On 2.0 profile, CodeGenerationOptions defaults to
GenerateProperties. Use full type name for XML serialization attributes
instead of shortcut (without Attribute suffix). Always add Namespace
argument for XmlRootAttribute on classes. Added IsNullable argument for
XmlRootRootAttribute on classes. For attribute members, only output
Form argument for XmlSchemaForm.Qualified. Use MapCodeGenerator base
ctor that takes CodeGenerationOptions.
* SoapCodeExporter.cs: Use MapCodeGenerator base ctor that takes
CodeGenerationOptions.
* MapCodeGenerator.cs: Added CodeGenerationOptions to ctor. On 2.0
profile, emit GeneratedCodeAttribute, SerializableAttribute,
DebuggerStepThroughAttribute and DesignerCategoryAttribute for classes.
To match MS.NET, emit attribute members before element members.
* XmlReflectionImporter.cs: Enums are never nullable.
* XmlSchemaImporter.cs: Set IsNullable on map using value of
XmlSchemaElement.IsNillable. Added LocateElement overload that takes
XmlSchemaElement.

svn path=/trunk/mcs/; revision=59768
2006-04-21 17:54:54 +00:00
Gert Driesen 425d73b4db * XmlSchemaImporterTests.cs: Enabled tests for bug #77907.
* XmlSchemaImporter.cs: Make sure we pass TypeData for primitive types
to XmlReflectionImporter and SoapReflectionImporter to keep from
always ending up with the XSD type that directly maps to the CLR type.
* XmlReflectionImporter.cs: Added overloads taking TypeData instead of
Type. This improves performance by avoiding the use of
TypeTranslator.GetTypeData for types imported from a schema and fixes
bug #77907.
* SoapReflectionImporter.cs: Same.

svn path=/trunk/mcs/; revision=59508
2006-04-15 13:14:38 +00:00
Lluis Sanchez 00c2330e9a 2006-04-11 Lluis Sanchez Gual <[email protected]>
* XmlSchemas.cs: In 1.1, don't allow adding two schemas
	with the same namespaces. This is allowed in 2.0. Fixed
	the Find() method to cope with this case. Based on a patch
	by David Jung.


svn path=/trunk/mcs/; revision=59384
2006-04-11 22:40:07 +00:00
Gert Driesen 4262df8c45 * XmlReflectionImporterTests.cs: Added ImportTypeMapping tests for
void and null type argument. Improved WrongChoices test to make sure
the exception(s) we throw match those of MSFT. Added test for bug
#77591.
* XmlReflectionImporter.cs: Throw NotSupportException instead of
InvalidOperationException (IOE) if void is specified as type in
ImportTypeMapping. To match MS.NET, surround importing of type in
try/catch block, and wrap any IOE in another IOE adding information
on the type that was being reflected. In CreateTypeMapping, surround
creating of map member in try/catch block, and wrap any IOE in another
IOE adding information on the member that was being reflected.
Modified exception message for missing enumeration value to match
MS.NET. In ImportTextElementInfo, throw IOE if Type is set in
XmlTextAttribute, and it differs from type of reflected member when
schema type of member is primitive or enum. Fixed bug #77591.

svn path=/trunk/mcs/; revision=58314
2006-03-22 20:25:21 +00:00
Gert Driesen 96bb8cbfee * XmlSchemaExporterTests.cs: Enabled tests for bug #77111.
* XmlSchemaExporter.cs: Import namespace of schema generated for
non-xsd primitive. Do not set zero-length TargetNamespace to avoid
emitting empty targetNamespace attribute in generated schema.
* XmlReflectionImporter.cs: Use WSDL types namespace for non-xsd
primitives.

svn path=/trunk/mcs/; revision=58132
2006-03-18 06:30:13 +00:00
Gert Driesen 9c4805562a * DeserializeTests.cs: Enabled tests for bug #77530.
* XmlSerializerTests.cs: Enabled tests for bug #77530.
* XmlTypeMapping.cs: EnumMapMember now also stores value for enums.
Modified EnumMapping.GetXmlName to use XmlCustomFormatter to support
serialization of integral value to enum constant name, and made sure
the exceptions we throw match those of MSFT. In EnumMapping.GetEnumName
throw InvalidOperationException if no matching enum constant exists.
In EnumMap ctor, initialize arrays holding XML names, enum names and
enum values.
* XmlSerializationReaderInterpreter.cs: Pass full type name to
EnumMapping.GetEnumName for construction of exception message.
* XmlSerializer.cs: In Deserialize, wrap InvalidOperationException
and InvalidCastException in another InvalidOperationException to match
MSFT. In Serialize, wrap InvalidOperationException, InvalidCastException
and the inner exception for a TargetInvocationException in an
InvalidOperationException to match MSFT.
* SerializationCodeGenerator.cs: In GenerateGetXmlEnumValue, use
XmlCustomFormatter.FromEnum in order to also support serialization
integral value to enum constant name. In 2.0 profile, throw
InvalidOperationException if numeric value cannot be serialized into
an enum constant value. In GenerateSingleEnumValue, no longer attempt
to parse unknown constant value but instead report it as
InvalidOperationException. Use string.Length instead of "" comparison
to check whether a string is empty. Fixed compiler warnings in
generated code (possible empty statement).
* XmlSerializationWriterInterpreter.cs: Pass full type name to
EnumMap.GetXmlName.
* XmlSchemaImporter.cs: Pass full type name to EnumMap.GetEnumName
to allow it to be used in exception messag* XmlReflectionImporter.cs.
Use FieldInfo instead of MemberInfo for enum fields. Use IsDefined 
instead of GetCustomAttributes for checking if a certain attribute
 is defined. Use integral value of enum constant in EnumMapMember ctor.
* SoapReflectionImporter.cs: Use FieldInfo instead of MemberInfo for
enum fields. Use IsDefined instead of GetCustomAttributes for checking
if a certain attribute is defined. Use integral value of enum constant
in EnumMapMember ctor.
es.

svn path=/trunk/mcs/; revision=57761
2006-03-10 04:37:54 +00:00
Lluis Sanchez eb88a00854 2006-03-07 Lluis Sanchez Gual <[email protected]>
* XmlReflectionImporter.cs: Ignore the element namespace if
	  the schema form is set to Unqualified. Fixes bug #75019.


svn path=/trunk/mcs/; revision=57688
2006-03-08 09:43:44 +00:00
Gert Driesen bb7e485ee3 * SerializationCodeGenerator.cs: Omit return statement in ReadObject method if
GenerateReadListElement returns null. Fixes bug #77588.

svn path=/trunk/mcs/; revision=57144
2006-02-22 06:47:06 +00:00
Lluis Sanchez ce5affe08f 2006-02-21 Lluis Sanchez Gual <[email protected]>
* XmlSerializer.cs: Fix the previous fix.
	

svn path=/trunk/mcs/; revision=57094
2006-02-21 15:25:32 +00:00
Lluis Sanchez edb5d9366d 2006-02-21 Lluis Sanchez Gual <[email protected]>
* XmlSerializer.cs: Added option to avoid falling back to the
	interpreted serializer if the code generator fails. To be used
	in the test suite.


svn path=/trunk/mcs/; revision=57091
2006-02-21 13:30:12 +00:00
Gert Driesen e9f16365f6 * TypeData.cs: Fixed the following issues when dealing with Array
SchemaType:
- if a type implements IDictionary, throw a NotSupportedException
- if a type implements ICollection, then an Add method must exist
  which takes a single argument of a type to which the listitem type
  is assignable (meaning a base type or an interface that it
  implements). If such a method does not exist, then throw an
  InvalidOperationException.
- if a type implements IEnumerable, then the listitem type is
  determined by the type of the Current property of the (IEnumerator)
  type returned by the GetEnumerator() method or the private
  implementation of IEnumerable.GetEnumerator(). If there's no
  public Current property on the IEnumerator, then System.Object
  is assumed as listitem type. Similar as for types implementing
  ICollection, an Add method must exist which takes a single argument
  of a type to which the listitem type is assignable (meaning a base
  type or an interface that it implements). If such a method does not
  exist, then throw an InvalidOperationException.
* XmlReflectionImporter.cs: Enabled few tests for bug #77531.
* SoapReflectionImporter.cs: Enabled few tests for bug #77531.

svn path=/trunk/mcs/; revision=56956
2006-02-16 18:46:54 +00:00
Lluis Sanchez 2bf5233dd8 2006-02-16 Lluis Sanchez Gual <[email protected]>
* XmlSchemaImporter.cs: Support importing complex types with
	  simple content based on enums. Fixes bug #76848.


svn path=/trunk/mcs/; revision=56948
2006-02-16 17:00:08 +00:00
Gert Driesen 008ad8e54c * SoapAttributeAttribute.cs: Set eol-style to CRLF.
* SoapElementAttribute.cs: Same.
* SoapEnumAttribute.cs: Same.
* SoapIncludeAttribute.cs: Same.
* SoapSchemaMember.cs: Same.
* SoapTypeAttribute.cs: Same.
* XmlArrayAttribute.cs: Same.
* XmlAttributeAttribute.cs: Same.
* XmlChoiceIdentifierAttribute.cs: Same.
* XmlElementAttribute.cs: Same.
* XmlEnumAttribute.cs: Same.
* XmlRootAttribute.cs: Same.
* XmlSchemaImporter.cs: Same.
* XmlTextAttribute.cs: Same.
* XmlTypeAttribute.cs: Same.
* XmlTypeMapping.cs: Same.
* SoapAttributeOverrides.cs: Fixed line endings. Set eol-style to CRLF.
* CodeIdentifiers.cs: Same.
* SoapCodeExporter.cs: Same.
* SoapAttributes.cs: Same.
* SoapIgnoreAttribute.cs: Same.
* SoapSchemaImporter.cs: Same.
* TypeMember.cs: Same.
* UnreferencedObjectEventArgs.cs: Same.
* XmlAnyAttributeAttribute.cs: Same.
* XmlAnyElementAttributes.cs: Same.
* XmlArrayItemAttributes.cs: Same.
* XmlAttributeEventArgs.cs: Same.
* XmlCodeExporter.cs: Same.
* XmlElementAttributes.cs: Same.
* XmlElementEventArgs.cs: Same.
* XmlIgnoreAttribute.cs: Same.
* XmlNamespaceDeclarationsAttribute.cs: Same.
* XmlNodeEventArgs.cs: Same.
* XmlReflectionMember.cs: Same.
* XmlSchemas.cs: Same.
* XmlSerializerNamespaces.cs: Same.
* XmlTypeMapMemberElement.cs: Set eol-style to native.

svn path=/trunk/mcs/; revision=56805
2006-02-11 16:45:52 +00:00
Gert Driesen 34560e9e64 * CodeExporter.cs: Set eol-style to native.
* CodeGenerationOptions.cs: Same.
* CodeIdentifier.cs: Same.
* ImportContext.cs: Same.
* IXmlSerializable.cs: Same.
* IXmlSerializerImplementation.cs: Same.
* IXmlTextParser.cs: Same.
* MapCodeGenerator.cs: Same.
* ReflectionHelper.cs: Same. Fixed line endings.
* SchemaImporter.cs: Same.
* SchemaImporterExtensionCollection.cs: Same.
* SchemaImporterExtension.cs: Same.
* SchemaTypes.cs: Same.
* SerializationCodeGeneratorConfiguration.cs: Same.
* SerializationCodeGenerator.cs: Same.
* SerializationSource.cs: Same.
* SoapReflectionImporter.cs: Same.
* SoapSchemaExporter.cs: Same.
* TypeData.cs: Same.
* TypeTranslator.cs: Same.
* UnreferencedObjectEventHandler.cs: Same.
* XmlAnyElementAttribute.cs: Same.
* XmlArrayItemAttribute.cs: Same.
* XmlAttributeEventHandler.cs: Same.
* XmlAttributeOverrides.cs: Same.
* XmlAttributes.cs: Same.
* XmlDeserializationEvents.cs: Same.
* XmlElementEventHandler.cs: Same.
* XmlIncludeAttribute.cs: Same.
* XmlMapping.cs: Same.
* XmlMemberMapping.cs: Same.
* XmlMembersMapping.cs: Same.
* XmlNodeEventHandler.cs: Same.
* XmlReflectionImporter.cs: Same.
* XmlSchemaExporter.cs: Same.
* XmlSchemaProviderAttribute.cs: Same.
* XmlSerializationCollectionFixupCallback.cs: Same.
* XmlSerialiationFixupCallback.cs: Same.
* XmlSerializationGeneratedCode.cs: Same.
* XmlSerializationReadCallback.cs: Same.
* XmlSerializationReader.cs: Same.
* XmlSerializationReaderInterpreter.cs: Same.
* XmlSerializationWriteCallback.cs: Same.
* XmlSerializationWriterInterpreter.cs: Same.
* XmlSerializerAssemblyAttribute.cs: Same.
* XmlSerializer.cs: Same.
* XmlSerializerFactory.cs: Same.
* XmlSerializerVersionAttribute.cs: Same.
* XmlTypeMapElementInfo.cs: Same.
* XmlTypeMapMemberAttribute.cs: Same.
* XmlTypeMapMember.cs: Same.
* XmlTypeMapMemberNamespaces.cs: Same.


svn path=/trunk/mcs/; revision=56798
2006-02-11 12:52:46 +00:00
Gert Driesen 1403a33280 * XmlTypeMapping.cs: Modified GetRealTypeMap to return current map if map
represents enum. Fixes bug #77501.
* XmlSerializerTests.cs: Added test for bug #77501. Added tests for XML and
encoded serialization of enums.

svn path=/trunk/mcs/; revision=56722
2006-02-09 20:55:36 +00:00
Gert Driesen 349e80c1e7 Forgot to commit changelog entry for bug #77500.
svn path=/trunk/mcs/; revision=56719
2006-02-09 18:28:10 +00:00
Lluis Sanchez 43981da719 2006-02-09 Lluis Sanchez Gual <[email protected]>
* System.Xml.Serialization/XmlTypeMapMemberElement.cs: When
	looking for the correct element definition for a member,
	based on the value type, take into account subypes of the
	declared types. Fixes bug #77447.


svn path=/trunk/mcs/; revision=56716
2006-02-09 17:06:43 +00:00
Gert Driesen fe34bc872c * XmlSerializationWriterTests.cs: Use Assert instead of deprecated
Assertion class. Added tests for FromEnum, WriteXsiType, 
WriteTypedPrimitive and WritePotentiallyReferencingElement. Changed
accessibility of Reset and Content on XmlSerializationWriterTester
and added public Execute methods for WritePotentiallyReferencingElement
and WriteTypedPrimitive, to allow this class to be useful for tests
that have effect on the prefix for other tests.
* XmlSerializationReaderTests.cs: Added tests for ToEnum.
* System.Xml_test.dll.Sources: Added XmlSerializationReaderTests.cs.
* XmlSerializationWriter.cs: Implemented 2.0 version of FromEnum, and
CreateInvalidEnumValueException. Set eol-style to native.
* XmlCustomerFormatter.cs: Added FromEnum overload that takes name of
enum for which string value must be created. Set eol-style to native.
Modified FromEnum to behave more like MSFT's implementation:
- treat value as bit field.
- no longer return empty string if the value matches an id for which there's 
no corresponding name.
- if one of the ids has value 0 and there's a match for the enum value
(with a zero length XML name) or the enum value is 0, then return the 
corresponding XML for the id with value 0.
- in 2.0 profile, throw InvalidOperationException if no match is found
for (part of) the enum value.
Modifies ToEnum to match the MSFT implementation (as described in
.NET 2.0 SDK):
- Expect hashtable containing enum names as key, and corresponding
integral numbers as value.
- Do not report exception for whitespace-only value.
- Support space (MS docs are not clear about this) delimited list 
of names.
- typeName is only used to construct exception message.

svn path=/trunk/mcs/; revision=56700
2006-02-09 13:30:02 +00:00