71 Commits
Author SHA1 Message Date
Maxim Lipnin 9988ebc7f2 [System.Xml] Fix deserialization issue (#16965)
[This ](https://github.com/mono/mono/pull/11194/files#diff-ae54d9565e735005686191de0f19ed50R431-R435)change in `XmlTypeMapElementInfo.GetElement`  introduced the logic for handling the case of derived types deserialization. 
For some cases (like https://github.com/mono/mono/issues/16918) it breaks existing functionality because it returns wrong element for given element name after searching withing derived types collection.

![image](https://user-images.githubusercontent.com/3258267/65416085-bedc0500-ddff-11e9-941c-f24045c64121.png)

Unfortunately, what I can do here is just reverting the related changes.

Fixes https://github.com/mono/mono/issues/16918
2019-09-24 11:35:15 +02:00
majellin24 92711632bf Modification to allow deserialization of derrived types (#11194)
* Modification to allow deserialization of derrived types

* white space correction

* second attempt

* third attempt

* fourth

* whitespace

* maybe fix null ref exception

* missed same condition in other method

* fixing condition

* hopefully correcting the test failure in AOT

* Modification to allow deserialization of derrived types

white space correction

second attempt

third attempt

fourth

whitespace

maybe fix null ref exception

missed same condition in other method

fixing condition

hopefully correcting the test failure in AOT

formatting

missed some formatting

* adding a test for PR #11194

* fixing a few exceptions

* adding ref
2018-10-31 10:43:46 +01:00
Marek Safar 00a8ed722d [System.Xml] Add XElement array handling to serialization interpreter. Fixes #12571 2016-11-10 18:43:14 +01:00
Marcos Henrich 916121f3d7 Property with attribute XmlTest is now set from ReadString only.
Before the change when the property default value was not null or empty the deserialized value would be the concatenation of the default value and the serialized value.
The correct behavior is to use the serialized value only.
Fixes 18908.
2014-09-26 10:35:57 +01:00
Marcos Henrich f8ff518ebe When needed serialized objects are now implicitly converted.
Fixes #20403.
2014-09-10 17:25: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
Lluis Sanchez d3fdb925ec Fix bug 9193 - XmlSerialization not properly deserializing a List 2013-01-09 13:54:47 +01:00
Roman Zavalov d491eb18e4 Fixed Choice ordered read bug #2907 2012-12-12 12:33:26 +04:00
Rodrigo Kumpera 3674b1167f Revert "Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes"
This reverts commit 8bb9b4409d, reversing
changes made to a5dd9d6910.
2012-12-11 15:42:12 -05:00
Nicolas Raoul b826dc791d do not check order sequence if option /order was not used 2012-11-06 10:34:15 +09:00
Nicolas Raoul f72fc52f07 Fix for issue 2907. I took Roman Zavalov's patch at https://bugzilla.xamarin.com/show_bug.cgi?id=2907#c10 and reverted the numerous formatting changes that were obscuring the real changes, hopefully making the diff clearer 2012-11-02 16:26:47 +09:00
Atsushi Eno 4fab2dc4c3 Fix bug #703910 - implement Order support in XmlSerializer. 2011-07-21 04:57:32 +09: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 8688f906c3 2008-06-05 Atsushi Enomoto <[email protected]>
* XmlSerializationReaderInterpreter.cs, MapCodeGenerator.cs,
	  SerializationCodeGenerator.cs : fixed bug #378696.
	  Default value should not be filled during deserialization, and
	  default values for DateTime/TimeSpan/DateTimeOffset should not be
	  output as raw string in generated code.

	* XmlSerializerTestClasses.cs, DeserializeTests.cs,
	  ComplexDataStructure.cs : added test for bug #378696.
	  Fixed couple of wrong tests that expects default values filled
	  during deserialization.


svn path=/trunk/mcs/; revision=104983
2008-06-05 11:28:51 +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 ef23f4f0cc 2007-04-20 Atsushi Enomoto <[email protected]>
* XmlTypeMapping.cs, ReflectionHelper.cs,
	  XmlSerializationReaderInterpreter.cs, SerializationCodeGenerator.cs:
	  support instantiation by private constructor.

	* XmlSerializerTests.cs :
	  Added test for serializing private-constructor-only class.


svn path=/trunk/mcs/; revision=76003
2007-04-20 11:13:46 +00:00
Atsushi Eno 19a69141f1 2007-02-20 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs,
	  XmlSerializationReaderInterpreter.cs :
	  Handle attributes on non-empty elements as well. Fixed bug #80131.

	* XmlSerializationReaderTests.cs : test non-empty element as well.


svn path=/trunk/mcs/; revision=73145
2007-02-20 07:38:35 +00:00
Atsushi Eno 26736f8173 2007-02-20 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs,
	  XmlSerializationReaderInterpreter.cs :
	  Handle empty root element.
	  Read out attribute parameters. To do that, split attribute
	  reader part from ReadMembers(), as it isn't invoked when the
	  element is empty.

	* XmlSerializationReaderTests.cs : added test for out attribute
	  parameters. It also tests empty root element.


svn path=/trunk/mcs/; revision=73143
2007-02-20 06:06:12 +00:00
Gert Driesen 5cab5ca519 * SerializationCodeGenerator.cs: Initialize out parameters if they
are value types. Fixed bug #79988.
* XmlSerializationReaderInterpreter.cs: Same.

svn path=/trunk/mcs/; revision=68877
2006-12-02 16:42:22 +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 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 eee1751b77 2005-12-07 Lluis Sanchez Gual <[email protected]>
* XmlSerializationReaderInterpreter.cs: When deserializing a "flat"
	collection, don't create a new collection if the property already has a 
	collection instance.
	* SerializationCodeGenerator.cs: same as above. Also return an empty
	string for flag enum default values.


svn path=/trunk/mcs/; revision=54043
2005-12-07 15:42:54 +00:00
Lluis Sanchez 6074454762 2005-12-05 Lluis Sanchez Gual <[email protected]>
* XmlSerializerTestClasses.cs:
	* DeserializeTests.cs: Added tests for bug #76808 and related behavior.

2005-12-05  Lluis Sanchez Gual  <[email protected]>

	* XmlSerializationReaderInterpreter.cs:
	* SerializationCodeGenerator.cs: When deserializing a collection,
	don't create a new collection if the property already has a 
	collection instance. This does not apply to arrays. Changed how nullabe
	array properties are set. Setting IsNullable=false to the property means
	that it won't be set if the read array is null (so, if the property
	already has a value, it will be kept).
	Another change is that can't never be null (only arrays can).


svn path=/trunk/mcs/; revision=53949
2005-12-05 20:44:42 +00:00
Vladimir Krasnov aed870ac2f XmlSerializationReaderInterpreter.cs: fixed ReadEnumElement method, ReadEndElement should check XmlNodeType.
XmlTypeMapping.cs: fixed GetXmlName method, it should not write zero as default enum value.

svn path=/trunk/mcs/; revision=53181
2005-11-17 15:09:06 +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 2edbc72ff5 2005-08-05 Lluis Sanchez Gual <[email protected]>
* XmlTypeMapping.cs: Added ListMembers property that returns
	members which are collections.
	* SerializationCodeGenerator.cs:
	* XmlSerializationReaderInterpreter.cs: Initialize collection
	members to an empty collection by default. Fixes bug #75662.


svn path=/trunk/mcs/; revision=48037
2005-08-05 11:43:30 +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
Lluis Sanchez e394f2ee4c 2005-04-12 Lluis Sanchez Gual <[email protected]>
* XmlTypeMapping.cs: Added new XmlSerializableMapping class.
	* XmlSchemaExporter.cs: When exporting an IXmlSerializable type,
	export the schema that it defines. In ImportNamespace, removed
	check for default namespace, since it may be included from a non
	default namespace.
	* XmlReflectionImporter.cs: Create a special map for IXmlSerializable
	types. All this based on a patch by Andrew Skiba.
	
	* SerializationCodeGenerator.cs:
	* XmlMapping.cs:
	* XmlSerializationReaderInterpreter.cs:
	* SoapCodeExporter.cs:
	* XmlTypeMapMemberAttribute.cs:
	* XmlSerializationReader.cs:
	* XmlCodeExporter.cs: Fixed some warnings.

2005-04-10  Andrew Skiba  <[email protected]>

2005-04-03  Andrew Skiba  <[email protected]>

svn path=/trunk/mcs/; revision=42841
2005-04-12 16:34:24 +00:00
Lluis Sanchez e4bc62c60c 2005-03-30 Lluis Sanchez Gual <[email protected]>
* SerializationCodeGenerator.cs: 
	* XmlSerializationReaderInterpreter.cs: If the element being read is
	bound to a choice member, set the corresponding value.
	* XmlTypeMapMember.cs: Added helper SetValue method.
	* XmlTypeMapElementInfo.cs: Changed the type of ChoiceValue to Object,
	since now stores the enum value.
	* XmlReflectionImporter.cs: Properly import choice values.
	* XmlTypeMapMemberElement.cs: Added setter for the choice.


svn path=/trunk/mcs/; revision=42416
2005-03-31 08:38:38 +00:00
Lluis Sanchez 652840c106 * SerializationCodeGenerator.cs, XmlSerializationReaderInterpreter.cs:
when reading a primitive value in encoded format using
	  ReadReferencingElement, provide the type name and namespace
	  since the xsi type may not be present in the xml element. This
	  fixes bug #65929.

svn path=/trunk/mcs/; revision=34157
2004-09-21 09:59:17 +00:00
Lluis Sanchez d996305ce2 * ReflectionHelper.cs, SoapReflectionImporter.cs, XmlReflectionImporter.cs:
In CheckSerializableType, add the option of ignoring types with private
	  constructors. Some kind of lists can be deserialized
	  even if the constructor is private. See bug #61464.
	* SerializationCodeGenerator.cs, XmlSerializationReaderInterpreter.cs:
	  Before creating a list, check that it has a public constructor.
	* TypeData.cs: Added HasPublicConstructor property.

svn path=/trunk/mcs/; revision=33230
2004-09-02 16:03:15 +00:00
Lluis Sanchez c5d8d4e2bd * SerializationCodeGenerator.cs, XmlSerializationReaderInterpreter.cs:
When deserializing an encoded method response, assign to the return value
	  the first element of the message, whatever it is. The return type doesn't
	  need to be Object, it seems to be true for all return types.

svn path=/trunk/mcs/; revision=32813
2004-08-25 08:41:06 +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 9bf6263942 * SerializationCodeGenerator.cs, XmlSerializationReaderInterpreter.cs:
In encoded format, primitive types can be null. Read them using
	  ReadReferencingElement, that already checks for the null tag.

svn path=/trunk/mcs/; revision=28157
2004-05-26 13:41:23 +00:00
Lluis Sanchez 304353fc3f * SerializationCodeGenerator.cs, XmlSerializationReaderInterpreter.cs:
When deserializing an encoded method response, if the return type of the
	  method is Object, assign to it the first element of the message, whatever
	  it is.
	* XmlSerializationReader.cs:
	* SoapReflectionImporter.cs, XmlReflectionImporter.cs: Set IsReturnValue of
	  the imported member.
	* TypeTranslator.cs: Added method to safely get a primitive TypeData.
	* XmlSerializationReader.cs: Don't throw an exception when the CLR type for
	  a given xsi type is not found. Just read it as primitive type.
	* XmlTypeMapMember.cs: Added IsReturnValue property.
	* XmlTypeMapping.cs: Added ReturnMember property.
	* XmlSerializer.cs: Reference System.Data when compiling the serializer.

svn path=/trunk/mcs/; revision=26836
2004-05-06 15:08:58 +00:00
Lluis Sanchez fb9c1efbf0 * SerializationCodeGenerator.cs, XmlSerializationReaderInterpreter.cs:
When reading an object using the typeof(object) map, an emty xsi:type
	  means that it has to read the contents into an XmlNode[].
	* TypeData.cs: Return the correct full name for inner classes.
	* XmlSchemaImporter.cs: Improved detection of types that represent
	  "anyType", and must be mapped to XmlElement, XmlNode or Object.
	* XmlSerializationReader.cs: In GetXsiType(), find the type attribute using
	  the correct namespace.
	  In ReadTypedPrimitive(), read the element as XmlNode[] if the type is
	  not known.

svn path=/trunk/mcs/; revision=26761
2004-05-05 13:32:08 +00:00
Lluis Sanchez e1753c687c * XmlSerializationReaderInterpreter.cs: Removed the check for null
AttributeMembers collection. Even if there are no attribute members,
	  attributes need to be read.

svn path=/trunk/mcs/; revision=26611
2004-05-03 17:21:23 +00:00
Lluis Sanchez 55dc9d8dd2 * SerializationCodeGenerator.cs, XmlReflectionImporter.cs,
XmlSerializationReader.cs, XmlSerializationReaderInterpreter.cs:
	  Support deserialization of members of type XmlDocument. This fixes #56169.

svn path=/trunk/mcs/; revision=24780
2004-03-30 11:14:36 +00:00
Lluis Sanchez ef6734e55d * SerializationCodeGenerator.cs: Generate an integer for unknown enum values.
Use a special method to generate default values, since default enum values
	  will come as integers, so a special cast is needed.
	* XmlSerializationReaderInterpreter.cs,
	* SerializationSource.cs, 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, XmlAttributes.cs,
	  XmlChoiceIdentifierAttribute.cs, XmlElementAttribute.cs, XmlElementAttributes.cs,
	  XmlEnumAttribute.cs, XmlReflectionMember.cs, XmlRootAttribute.cs,
	  XmlTextAttribute.cs, XmlTypeAttribute.cs: Had to change the implementation
	  of SerializationSource. It can't keep and use the XmlAttributeOverride
	  instances as key values, since those instances can be modified after the
	  xml map has been generated. Now, SerializationSource generates a unique
	  string hash from XmlAttributeOverride and uses it for comparisons.

svn path=/trunk/mcs/; revision=24553
2004-03-25 00:07:43 +00:00
Lluis Sanchez a303d9ab6f * SerializationCodeGenerator.cs: Several fixes: generate valid names for
WriteRoot_ and ReadRoot_ methods. Cast result of ReadTypedPrimitive to
	  the adequate type. Set the default value of members that do have a default
	  value. Other minor fixes.
	* SoapReflectionImporter.cs, XmlReflectionImporter.cs: All maps must derive
	  from typeof(object) map, even those that have another base class.
	* XmlCustomFormatter.cs: Fixed generation of conversion from char to string.
	  It must serialize the char as number, not as character.
	* XmlSerializationReaderInterpreter.cs: Set the default value of members
	  that do have a default value.
	* XmlTypeMapping.cs: Added property MembersWithDefault, which returns a list
	  of members that have a default value.

svn path=/trunk/mcs/; revision=24540
2004-03-24 19:30:12 +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 af31a18a06 * MapCodeGenerator.cs: Modified some methods to make them easier to reuse.
Those are basically methods to add custom attributes to element and
	  attribute members.
	* SoapCodeExporter.cs: Track changes in MapCodeGenerator.
	* XmlCodeExporter.cs: Better support for custom attribute generation for
	  method parameters.
	* XmlCustomFormatter.cs: Added null check.
	* XmlSchemaImporter.cs: do not set IsOptionalValueType property to
	  attributes that are required.
	* XmlSerializationReaderInterpreter.cs: Method parameters may be serialized
	  as attributes.

svn path=/trunk/mcs/; revision=23131
2004-02-16 15:40:15 +00:00
Lluis Sanchez 4160809c3b * MapCodeGenerator.cs: Added helper method for generating an attribute
parameter of type enum.
	* XmlAttributeAttribute.cs: little fix.
	* XmlCodeExporter.cs: Support XmlAnyAttribute when generating attributes
	  for method parameters.
	* XmlMemberMapping.cs: Improved support for members of type "any".
	* XmlReflectionImporter.cs: Improved assignment of the attribute form.
	  If the namespace is explicitly specified, then the form should be
	  qualified. Also fixed issues with the namespace assigned to attributes.
	  This should fix bug #53384.
	* XmlSchemaExporter.cs: ExportMembersMapping(): improved support for
	  methods that return values of type "any". Changed the methods
	  AddSchemaArrayElement and AddSchemaElement, so instead of adding the
	  element, return it, and the caller must add it to the collection.
	  Other fixes in attribute generation.
	* XmlSchemaImporter.cs: ImportAnyType(): if a type name is provided,
	  generate the AnyType mapping from the type described in the schema.
	  Small fixes regarding IsMixed property of complex types (it means that
	  the type can contain text, so the XmlTextAttribute must be generated).
	* XmlSerializationReaderInterpreter.cs: Reading of members by-order must
	  be only used in the bare+encoded format.

svn path=/trunk/mcs/; revision=22533
2004-01-27 12:43:22 +00:00
Lluis Sanchez 43c5b1c716 * XmlSerializationReaderInterpreter.cs: When deserializing an XmlElement,
do not check the root element name, since it can be any name. This fixes
	  bug #53201.

svn path=/trunk/mcs/; revision=22393
2004-01-22 11:07:41 +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