55 Commits
Author SHA1 Message Date
Marcos Henrich f8ff518ebe When needed serialized objects are now implicitly converted.
Fixes #20403.
2014-09-10 17:25:44 +01:00
Marcos Henrich 5fdbad2444 Changed method ImplicitConvert to internal static. 2014-09-10 17:24:38 +01:00
Marcos Henrich 0804720aaa ImplicitConvert was using method with wrong parameter and return type. 2014-09-10 17:23:44 +01:00
Marcos Henrich 38d56909d9 Fixed XmlSerializer to handle attribute XmlSchemePrivider.IsAny.
XmlSerializer no longer outputs a root element with class name when the class has the attribute XmlSchemeProvider and IsAny is true.
Fixes #11916
2014-08-18 11:42:05 +01:00
Rodrigo Kumpera 8752d92528 Kill MOONLIGHT from System.Xml. 2013-02-11 16:03:40 -05:00
Miguel de Icaza 07b6638343 Apply patch from Tom Hindle to fix ##2893 and add a test case.
The serializer interpreted was broken, but the compiled version was fine,
running MONO_XMLSERIALIZER_THS=0 allowed this to run
2012-01-14 15:35:45 -05:00
Sebastien Pouliot 4925054bb0 Make some S.X.S types compatible with the SL API (for SDK)
* XmlAnyElementAttributes.cs:
* XmlArrayItemAttributes.cs:
* XmlElementAttributes.cs:
	Under Silverlight API this implement IList only (does not
inherit from CollectionBase).

* XmlCustomFormatter.cs:
* XmlSerializationWriterInterpreter.cs:
	Use a Convert.ChangeType override that exists in SL API

* XmlReflectionImporter.cs: Provide an alternative for (missing in SL)
Enum.GetNames and select available (in SL) overloads for parsing and
formatting for enums

* XmlSerializationReader.cs: Fix ToEnum API to use IDictionary (in SL)
instead of Hashtable (even if the SL4 docs still states the later)

* XmlSerializationReaderInterpreter.cs:
* XmlTypeMapping.cs:
	Use the default (identical to nonPublic being false) when using
	Activator.CreateInstance under SL

* XmlSerializationWriter.cs: Internally use a Queue<T> instead a a Queue
(not available in SL). Also Namespaces (ArrayList) is replaced by
XmlNamespaces (IList) in SL API.

* XmlSerializer.cs: Do not use environment variables in MOONLIGHT (like
the rest of MOBILE). Use Encoding.UTF8 instead of ENcoding.Default since
the later does not exist in SL.

* XmlSerializerImplementation.cs: SL version use IDictionary instead of
Hashtable for properties.

* XmlSerializerNamespaces.cs: Internally use a generic Dictionary
* instead
of a ListDictionary (which is not available in SL)
2011-05-06 08:40:41 -04:00
Lluis Sanchez a8aa1e0653 [Web.Services] Add support for optional parameters
Non-nullable web service parameters can be made optional by
adding an additional parameter with the same name and a
'Specified' suffix. This was supported when serializing
classes, but not when serializing web service parameters.
This might fix bug 688496.
2011-04-28 18:33:59 +02:00
Atsushi Eno 8fe0d1c078 Prepare for new System.Xml.Serialization.dll build (moonlight sdk assembly). 2011-04-15 15:00:40 +09:00
Atsushi Eno 2866de3175 2010-01-26 Atsushi Enomoto <[email protected]>
* XmlReflectionImporter.cs, SerializationCodeGenerator.cs,
	  XmlSerializationWriterInterpreter.cs: XmlAnyElementAttribute can be
	  still used for non-XmlNode (object) array. It only fails when it
	  tries to serialize non-XmlNode object at run-time.
	  Fixed bug #553032.

	* XmlSerializerTests.cs : added test for bug #553032.


svn path=/trunk/mcs/; revision=150197
2010-01-26 07:06:51 +00:00
Atsushi Eno dfa3a04f22 2008-09-02 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs
	  XmlSerializationWriterInterpreter.cs : fixed bug #419973.
	  Sometimes implicit operators could involve and it affects on
	  typecasting. It's simple for code generator, but very bad for
	  reflection.

	* XmlSerializerTestClasses.cs, XmlSerializerTests.cs:
	  added test for bug #419973.


svn path=/trunk/mcs/; revision=112103
2008-09-02 16:56:08 +00:00
Lluis Sanchez 9dc8e1d48a * TypeData.cs: Prefix with a '@' type names that are equal to keywords.
* XmlSerializationReaderInterpreter.cs,
  XmlSerializationWriterInterpreter.cs: Properly handle nullable enum
  values.
* SerializationCodeGenerator.cs: Properly handle nullable enum values.
  Don't generate read flags for text collectors (avoid var not used
  warning).
* XmlReflectionImporter.cs: Assign the MappedType to text collector
  members. It is needed when the member is an enum.

svn path=/trunk/mcs/; revision=99512
2008-04-01 14:18:44 +00:00
Atsushi Eno 6959e0c1d3 2007-09-25 Atsushi Enomoto <[email protected]>
* XmlSerializerTests.cs : added deserialization test for
	  XmlSchemaProviderAttribute use.
	* XmlReflectionImporterTests.cs : added test for conclict resolution
	  between defaultNamespace and XmlSchemaProvider() namespace.
	* XmlSchemaExporterTests.cs : use Infoset() comparison.

	* XmlTypeMapping.cs : Namespace and XmlTypeNamespace could be
	  different when an explicit namespace is specified (e.g. at
	  XmlReflectionImporter.ctor).
	* SerializationCodeGenerator.cs,
	  XmlSerializationWriterInterpreter.cs :
	  revert XmlTypeMapping.XmlTypeNamsepace usage. Now with the fix
	  above, original code should work fine.


svn path=/trunk/mcs/; revision=86346
2007-09-25 17:35:18 +00:00
Atsushi Eno 1e597c4439 2007-09-25 Atsushi Enomoto <[email protected]>
* XmlTypeMapping.cs, XmlSerializationWriterInterpreter.cs,
	  SerializationCodeGenerator.cs :
	  More XmlSchemaProviderAttribute method check. Use QName returned
	  by the method for the output root name.

	* XmlSerializerTests.cs, XmlReflectionImporterTests.cs :
	  added tests for XmlSchemaProviderAttribute and how its qname works.


svn path=/trunk/mcs/; revision=86340
2007-09-25 15:55:48 +00:00
Atsushi Eno 6b03552e04 2007-07-26 Atsushi Enomoto <[email protected]>
* XmlSerializationWriterInterpreter.cs : looks like XmlNode[]
	  serialization is a complicated mess. bug #81539.

	* XmlSerializerTests.cs : test for #81539.
	  Sigh, why no one added tests.


svn path=/trunk/mcs/; revision=82708
2007-07-26 00:15:11 +00:00
Konstantin Triger d86b64b7c2 refactoring for performance
svn path=/trunk/mcs/; revision=76794
2007-05-06 18:05:58 +00:00
Atsushi Eno 538b940300 2007-02-07 Atsushi Enomoto <[email protected]>
* XmlSerializationWriter.cs : WriteTypedPrimitive() does not support
	  XmlNode arrays.
	* XmlSerializationWriterInterpreter.cs,
	  SerializationCodeGenerator.cs : so they have to be handled here.

	* XmlSerializerTests.cs : added some XmlNode array/list tests.
	* XmlSerializationWriterTests.cs : removed more NotWorking. Added
	  WriteTypedPrimitive() error test for XmlNode.


svn path=/trunk/mcs/; revision=72448
2007-02-07 18:47:55 +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
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 814b15d6b0 2005-10-17 Lluis Sanchez Gual <[email protected]>
* SerializationCodeGenerator.cs: 
	* XmlSerializationWriterInterpreter.cs: Arrays of XmlNode don't
	need to be all XmlElments. Fix by Atsushi for bug #76288.


svn path=/trunk/mcs/; revision=51795
2005-10-17 10:39:40 +00:00
Lluis Sanchez 05ddc568ab 2005-09-26 Lluis Sanchez Gual <[email protected]>
* XmlTypeMapping.cs: Added ChoiceMember to ListMap.
	In ListMap.FindElement, take into account the ChoiceMember
	if set.
	* SerializationCodeGenerator.cs:
	* XmlSerializationReaderInterpreter.cs: For lists with a choice
	member, fill the member with the corresponding enum values.
	* XmlReflectionImporter.cs: Properly reflect the choice member
	when applied to a list.
	* XmlSerializationWriterInterpreter.cs: Track class changes.
	* XmlTypeMapMemberElement.cs: Added ChoiceTypeData property.
	All this fixes bug #76203.


svn path=/trunk/mcs/; revision=50779
2005-09-26 15:40:46 +00:00
Lluis Sanchez 427c682fdd 2005-08-24 Lluis Sanchez Gual <[email protected]>
* TypeData.cs: Reset the hasPublicConstructor flag when the
	type is an interface.
	* XmlSerializationWriterInterpreter.cs: Get the Count property
	from the object type instead of the property type (it didn't
	work for IList). 
	* ReflectionHelper.cs: In CheckSerializableType, don't trow
	if the type is a collection interface. All this fixes
	bug #75855.


svn path=/trunk/mcs/; revision=48799
2005-08-24 17:55:22 +00:00
Lluis Sanchez f4b6e37e35 2005-06-14 Lluis Sanchez Gual <[email protected]>
* XmlTypeMapElementInfo.cs: Added new DataTypeName property for
	getting the real xml type name of a member.
	* XmlSerializationWriterInterpreter.cs: Use that new property
	to get the type name of primitive types. This should fix bug #75180.


svn path=/trunk/mcs/; revision=45943
2005-06-14 10:16:40 +00:00
Lluis Sanchez ce518937f0 Reverting invalid patch.
svn path=/trunk/mcs/; revision=42993
2005-04-14 10:46:13 +00:00
Andrew Skiba b89b895ffd Call XmlConvert.EncodeLocalName where needed
svn path=/trunk/mcs/; revision=42986
2005-04-14 06:41:10 +00:00
Atsushi Eno 303719101a 2005-01-14 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs,
	  XmlSerializationWriterInterpreter.cs : exchanged attribute
	  serialization orders (XmlAnyAttribute <-> XmlNamespaceDeclarations).
	  xmlns attributes in XmlAnyAttribute are not written.



svn path=/trunk/mcs/; revision=38944
2005-01-14 16:47:43 +00:00
Lluis Sanchez 212bcb99fe 2004-11-24 Lluis Sanchez Gual <[email protected]>
* SerializationSource.cs: Made SerializationSource abstract, and
	renamed Equals to BaseEquals to avoid missing GetHashCode warning
	(it does not really make sense in this case).
	* XmlSchemaExporter.cs, SerializationCodeGenerator.cs,
	XmlReflectionImporter.cs, XmlSerializationWriterInterpreter.cs,
	XmlSerializationReader.cs: Fixed warnings.


svn path=/trunk/mcs/; revision=36462
2004-11-24 09:52:05 +00:00
Duncan Mak 8fa6e766dd Add MIT license to System.XML.DLL
svn path=/trunk/mcs/; revision=30055
2004-06-21 18:07:31 +00:00
Lluis Sanchez 95d2d48bb3 * SerializationCodeGenerator.cs: Added support for generation of readers
and writers for several maps in a single class. Added support for
	  XmlMemberMapping. Fixed generation of serializers that use encoded format.
	* SoapAttributeAttribute.cs, SoapAttributeOverrides.cs, SoapAttributes.cs,
	  SoapElementAttribute.cs, SoapEnumAttribute.cs, SoapTypeAttribute.cs,
	  XmlAnyElementAttribute.cs, XmlAnyElementAttributes.cs, XmlArrayAttribute.cs,
	  XmlArrayItemAttribute.cs, XmlArrayItemAttributes.cs, XmlAttributeAttribute.cs,
	  XmlAttributeOverrides.cs, XmlChoiceIdentifierAttribute.cs, XmlRootAttribute.cs,
	  XmlElementAttribute.cs, XmlElementAttributes.cs, XmlEnumAttribute.cs,
	  XmlReflectionMember.cs, XmlTextAttribute.cs, XmlTypeAttribute.cs:
	  Added InternalEquals method.
	* XmlAttributes.cs: Removed a lot of unused code. Added InternalEquals method.
	* SoapReflectionImporter.cs: Set SerializationSource to generated maps.
	* XmlCustomFormatter.cs: Fixed little bug.
	* XmlMapping.cs: Added Source property. This a global identifier of the map.
	* XmlReflectionImporter.cs: Set SerializationSource to generated maps.
	* XmlSchemaImporter.cs: Set the correct value for IsNillable when importing
	  mapping members.
	* XmlSerializationReaderInterpreter.cs, XmlSerializationWriter.cs: Minor fixes.
	* XmlSerializationWriterInterpreter.cs: WriteObject and WriteEnum were not
	  correctly used.
	* XmlSerializer.cs: Added support for generation of serializers.

svn path=/trunk/mcs/; revision=23392
2004-02-24 12:03:28 +00:00
Lluis Sanchez 24ebffbe3a * XmlReflectionImporter.cs: Get the class members using the right order.
* XmlSerializationWriterInterpreter.cs: Removed unneeded code.
	  A member with the Any attribute can also contain text. Support this.
	* XmlTypeMapMemberElement.cs: Added CanBeText property.

svn path=/trunk/mcs/; revision=22750
2004-02-03 23:05:17 +00:00
Lluis Sanchez 648ca0b963 * XmlSerializationReaderInterpreter.cs, XmlSerializationWriterInterpreter.cs,
XmlTypeMapMember.cs, MapCodeGenerator.cs, SoapCodeExporter.cs, TypeData.cs,
	  XmlCodeExporter.cs, XmlReflectionImporter.cs, XmlSchemaExporter.cs,
	  XmlSchemaImporter.cs, XmlSerializationReaderInterpreter.cs,
	  XmlSerializationWriterInterpreter.cs, XmlTypeMapMember.cs:
	  Added support for value specifiers members. This fixes bug #53024.

svn path=/trunk/mcs/; revision=22308
2004-01-20 18:18:25 +00:00
Lluis Sanchez 29b478f6bf * XmlReflectionImporter.cs: Read IsNullable flag from XmlArrayAttribute.
* XmlSerializationWriterInterpreter.cs: Interpret IsNullable flag for
  arrays. This fixes bug #53018.

svn path=/trunk/mcs/; revision=22270
2004-01-19 19:15:08 +00:00
Lluis Sanchez b3aa17a569 * XmlReflectionImporter.cs, XmlSerializationWriterInterpreter.cs
XmlTypeMapping.cs: more namespace fixes.

svn path=/trunk/mcs/; revision=22022
2004-01-13 15:19:53 +00:00
Lluis Sanchez ce97eef8b3 * XmlCodeExporter.cs: Little fix.
* XmlSchemaExporter.cs: In rpc format, make sure that parameters with the
	  same name have the same type.
	* XmlSchemaImporter.cs: Support xml:lang.
	* XmlSerializationReader.cs, XmlSerializationWriterInterpreter.cs:
	  fixed wrong namespace for the arrayType attribute.

svn path=/trunk/mcs/; revision=21034
2003-12-11 18:10:29 +00:00
Lluis Sanchez f0f70ad254 Applied patch by Eran Domb. If type is Enum, the code use type.GetElememtType() instead of Enum.GetUnderlyingType().
svn path=/trunk/mcs/; revision=20380
2003-11-24 11:46:26 +00:00
Lluis Sanchez 61080dc4f9 * SerializationCodeGenerator.cs: Minor fixes.
* SoapReflectionImporter.cs: More fixes.
	* SoapSchemaExporter.cs: implemented.
	* SoapSchemaImporter.cs: Initial implementation.
	* TypeTranslator.cs: new methods for dealing with encoded arrays: GetArrayName
	  and ParseArrayType
	* XmlCodeExporter.cs: Fix. When exporting a map, export all derived maps.
	* XmlMemberMapping.cs: Minor fixes.
	* XmlMembersMapping.cs: added some convenient constructors.
	* XmlSchemaExporter.cs: Added support for encoded format.
	* XmlSchemaImporter.cs: Added support for encoded format.
	* XmlSerializationReader.cs: changed some string literals by constants.
	  Implemented ParseWsdlArrayType.
	* XmlSerializationReaderInterpreter.cs: Read typeArray attribute when serializing
	  custom attributes.
	* XmlSerializationWriter.cs: Implemented WriteXmlAttribute.
	* XmlSerializationWriterInterpreter.cs: Use WriteXmlAttribute instead of
	  WriteAttribute to write custom attributes.
	* XmlSerializer.cs: added some namespace constants.
	* XmlTypeMapping.cs: added GetSchemaArrayName method.

svn path=/trunk/mcs/; revision=17856
2003-09-04 02:39:08 +00:00
Lluis Sanchez fb0fca96f3 * SoapReflectionImporter.cs: Fixed construcion of XmlMemberMapping.
* XmlMemberMapping.cs: Changed constructor.
	* XmlReflectionImporter.cs: Fixed construcion of XmlMemberMapping.
	* XmlSchemaImporter.cs: Implemented ImportMembersMapping().
	* XmlSerializationReaderInterpreter.cs: Added some helper methods. Changed visibility.
	* XmlSerializationWriterInterpreter.cs: Changed visibility.

svn path=/trunk/mcs/; revision=17721
2003-08-29 12:27:26 +00:00
Lluis Sanchez d19e51679d * XmlReflectionImporter.cs: Fill RelatedMaps property of the generated map.
* XmlSchemas.cs: Find method: make sure the returned object belongs to
	  the requested type.
	* XmlSerializationReader.cs: Removed unneded virtual ReadObject method.
	  Add null checks for eventSource.
	* XmlSerializationReaderInterpreter.cs: ReadObject is not virtual any more.
	* XmlSerializationWriter.cs: In Initialize method, initialize the provided
	  namespece declarations. Virtual method WriteObject not needed any more.
	  In WriteStartElement, write the provided namespaces.
	* XmlSerializationWriterInterpreter.cs: Write object is not virtual any more.
	  Added GetTypeMap method, that returns the map for a given type. Added some
	  virtual methods, so writer behavior can be extended at several places by
	  derived classes.
	* XmlSerializer.cs: Changed behavior to match what MS.NET does. The virtual
	  methods CreateReader and CreateWriter are not called unless no type or
	  type mapping was provided in the constructor.

svn path=/trunk/mcs/; revision=17690
2003-08-28 12:13:06 +00:00
Lluis Sanchez 4de0bcd2ae * XmlSchemaImporter.cs: Implemented ImportTypeMapping and all needed parsing
stuff.
	* SoapReflectionImporter.cs: Set the type namespace parameter when creating a map.
	* TypeData.cs: Added property that returns a TypeData that represents an array of
	  the given TypeData.
	* TypeTranslator.cs: Added GetArrayName() method.
	  Added TypeDatas for missing primitive types.
	* XmlCodeExporter.cs: Implemented ExportMembersMapping. Fixed generation of
	  XmlRootAttribute. Added the namespace to all attributes being generated.
	  Other fixes in the generation of code.
	* XmlReflectionImporter: store the namespace of the type in the maps.
	* XmlSchemaExporter.cs: Several fixes. Only set the "mixed" attribute if the
	  class can generate text. Do not export inherited attributes of a class.
	  Use the new root namespace stored in the map when generating the root element.
	* XmlSerializationWriter: Always write a prefix when writing a qname, even if the
	  namespace is the default namespace.
	* XmlSerializationWriterInterpreter.cs: fixed missing "else".
	* XmlTypeMapElementInfo.cs: In DataTypeNamespace property, return the type
	  namespace instead of the map namespace (which can be different if the type
	  has a XmlRoot element).
	* XmlTypeMapMember.cs: Set the default value of the DefaultValue property
	  to System.DBNull.Value.
	* XmlTypeMapMemberElement.cs: ElementInfo property: In the getter Create
	  the collection if it has not yet been created.
	* XmlTypeMapping.cs: Added property XmlTypeNamespace which stores the namespace
	  of the type. It may be different from the namespace of the map if the type
	  has a XmlRoot element. Also added IsSimpleType property.
	  In ClassMap, added AllMembers property.

svn path=/trunk/mcs/; revision=17075
2003-08-05 17:22:50 +00:00
Lluis Sanchez 0ea2f093aa * TypeTranslator.cs: Added new primitive types: NMTOKEN and NCName.
* XmlSerializationWriterInterpreter.cs: Write XmlAttributes with the prefix
	  they have.

svn path=/trunk/mcs/; revision=16519
2003-07-22 09:49:51 +00:00
Lluis Sanchez e50997bcf7 * SoapReflectionImporter.cs, XmlReflectionImporter.cs: Avoid generating two
maps with the same name and namespace. To avoid this, maps must be registered
	  using the real map namespace, not the default namespace (the namespace can
	  change if the type has a XmlType or SoapType attribute).
	* XmlArrayItemAttribute.cs: Set IsNullable to true by default.
	* XmlSchemaExporter.cs: Implemented method ExportMembersMapping.
	  Other small fixes.
	* XmlSerializationWriterInterpreter.cs: GetStringValue: return null if the value
	  is null.

svn path=/trunk/mcs/; revision=16262
2003-07-15 11:36:43 +00:00
Lluis Sanchez 8432c1b289 * SoapReflectionImporter.cs: Set the BaseMap property of map. Small fix.
* TypeData.cs: IsComplexType now returns true for IXmlSerializable types.
	* XmlAttributes.cs: Fixed bug when reading the value of DefaultValueAttribute.
	* XmlReflectionImporter.cs: Set the BaseMap property of map. Several small fixes.
	* XmlSchemaExporter.cs: Implemented.
	* XmlSchemas.cs: Support schemas with TargetNamespace set to null.
	* XmlSerializationWriter.cs: FromXmlQualifiedName (): return null if the qname is null.
	  GetNamespacePrefix (): no need to add xmlns attribute if namespace is null.
	* XmlSerializationWriterInterpreter.cs: Fixed management of default values.
	  GetStringValue() returns null if the value is null, instead of empty string.
	  (attributes with null values are not written).
	* XmlTypeMapElementInfo.cs: added IsTextElement and IsUnnamedAnyElement properties.
	* XmlTypeMapMemberAttribute.cs: added DataTypeNamespace and removed DataType.
	  DataType value can is now in TypeData.
	* XmlTypeMapMemberElement.cs: Small fix.
	* XmlTypeMapping.cs: Added FindMember method and BaseMap property.

svn path=/trunk/mcs/; revision=16235
2003-07-14 18:43:11 +00:00
Lluis Sanchez 0fb5c9e6e7 * SoapReflectionImporter.cs: Fix support for DataType in class members.
* TypeData.cs: Don't use "Index" name to get indexer property. Indexer properties
	  can have other names.
	* TypeTranslator.cs, XmlCustomFormatter.cs: Added support for "time" and "data" xml types.
	* XmlReflectionImporter.cs, XmlTypeMapElementInfo.cs, XmlSerializationReader.cs,
	  XmlSerializationWriter.cs, XmlTypeMapElementInfo.cs, XmlTypeMapping.cs:
	  Fix support for DataType in class members.
	* XmlSerializationReaderInterpreter.cs, XmlSerializationWriterInterpreter.cs:
	  Added support for array of primitive types in attributes.

svn path=/trunk/mcs/; revision=15791
2003-06-30 21:13:56 +00:00
Lluis Sanchez da1a2d5e1f * TypeData.cs: Type of item of ICollections is now taken from the Item(int) property. Add() can
be overlodaded, so it is not good for this.
	* XmlSerializationWriterInterpreter.cs: Fix ambiguity bug when getting Item property of a collection.

svn path=/trunk/mcs/; revision=15698
2003-06-28 00:36:33 +00:00
Lluis Sanchez f213541b82 * XmlReflectionImporter.cs: Reset internal tables for each ImportMembersMapping call.
* XmlSerializationReader.cs: GetXsiType(): use current reader.namespaceUri if namespace
	  is not specified in the xsi attribute.
	* XmlSerializationReaderInterpreter.cs: Fixed bug when reading an empty array from an empty element.
	* XmlSerializationWriterInterpreter.cs: Added null value check when writting an array.

svn path=/trunk/mcs/; revision=15459
2003-06-17 15:27:01 +00:00
Atsushi Eno c196e56b6e 2003-06-16 Atsushi Enomoto <[email protected]>
* XmlSerializationReader.cs : Synchronous fix with
	  XmlElement.GetAttribute(name, ns) fix for GetNullAttr().
	* added XmlTypeMapMemberNamespace.cs.
	* XmlReflectionImporter,
	  XmlSerializationReaderInterpreter.cs,
	  XmlSerializationWriterInterpreter.cs,
	  XmlTypeMapping.cs : support for XmlNamespaceDeclarationAttribute.

svn path=/trunk/mcs/; revision=15441
2003-06-16 17:15:55 +00:00
Lluis Sanchez 028bb2c2ca * XmlSerializationReader.cs: Fixed implementation of ReadElementQualifiedName() and ReadTypedPrimitive().
* XmlSerializationReaderInterpreter.cs: Improved serialization of XmlQualifiedNames.
	* XmlSerializationWriter.cs: implemented methods for reading XmlQualifiedNames.
	* XmlSerializationWriterInterpreter.cs: Improved deserialization of XmlQualifiedNames.

svn path=/trunk/mcs/; revision=15368
2003-06-13 16:09:27 +00:00
Lluis Sanchez 014e3c71b3 * SchemaTypes.cs: Changed DataSet type for a more generic XmlSerializable.
* SoapReflectionImporter.cs: tiny fix.
	* XmlReflectionImporter.cs, TypeData.cs, XmlSerializationWriterInterpreter.cs,
	  XmlSerializationReaderInterpreter.cs: Added support for IXmlSerializable.
	* XmlSerializationReader.cs: Fixed implementation of ReadSerializable().
	* XmlSerializationWriter.cs: implemented WriteSerializable ().

svn path=/trunk/mcs/; revision=15364
2003-06-13 09:48:24 +00:00
Lluis Sanchez 2abcd5c4c8 * XmlAnyElementAttribute.cs, XmlArrayItemAttribute.cs: Added AllowMultiple flag.
* XmlReflectionImporter.cs, XmlSerializationWriterInterpreter.cs,
	  XmlSerializationReaderInterpreter.cs, XmlTypeMapElementInfo.cs,
	  XmlTypeMapMemberElement.cs, XmlTypeMapping.cs: Added support for XmlTextAttribute.
	* XmlSerializationWriter.cs: small fix.

svn path=/trunk/mcs/; revision=15350
2003-06-12 19:34:16 +00:00
Lluis Sanchez 421c4a18e2 * XmlReflectionImporter.cs: Added support for XmlIgnoreAttribute in enum members.
Added support for DefaultValueAttribute.
	* XmlSerializationWriterInterpreter.cs: Added support for DefaultValueAttribute. Fixed bug when writting
	  the value of an enum.
	* XmlTypeMapMember.cs: Added DefaultValue attribute.
	* XmlTypeMapping.cs: EnumMap.GetXmlName and GetXmlValue, so they can now deal with
	  integer values.

svn path=/trunk/mcs/; revision=15326
2003-06-11 23:16:11 +00:00