Commit Graph
9 Commits
Author SHA1 Message Date
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 d2f63bb61f * MapCodeGenerator.cs: Changed some methods to make them easier to reuse.
* TypeTranslator.cs: NMTOKENS, ENTITIES and IDREFS must be mapped to
	  string, not string[].
	* XmlCodeExporter.cs: AddMappingMetadata(): improved attribute generation
	  for array parameters. In general, improved generation of schema Form
	  property.
	* XmlMemberMapping.cs: Added Form property.
	* XmlReflectionImporter.cs: Types that inherit from other types cannot be
	  simple types. Added a check for this.
	* XmlSchemaExporter.cs: several fixes: better generation of IsMixed and
	  Form. The key used to determine if a map has been already generated must
	  include the XmlType, since there can be two xml types with the same CLR
	  type and namespace (for example, they may differ in the Form property).
	* XmlSchemaImporter.cs: When getting the TypeData for a schema element,
	  also return the corresponding map. There can be two maps that have the
	  same TypeData, so given a TypeData is not always possible to get the
	  correct corresponding map (for example two arrays that only differ in the
	  Form of the item).
	* XmlTypeMapping.cs: Added method to set if a map can represent a simple
	  type or not.

svn path=/trunk/mcs/; revision=22968
2004-02-11 11:27:23 +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 b46db4ea02 * MapCodeGenerator.cs, XmlSchemaImporter.cs: Attributes are allways optional,
so a 'specified' member has always to be generated.
	* TypeData.cs: Fixed check for value type.

svn path=/trunk/mcs/; revision=22309
2004-01-20 19:18:46 +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 35c1a12ab0 * MapCodeGenerator.cs: Use type namespace instead of root namespace as
default namespace for members.
	* XmlCodeExporter.cs: Fixed generation of XmlRootAttribute.
	* XmlReflectionImporter.cs: Fixed the assignment of root and type
	  namespaces.
	* XmlSchemaExporter.cs: Use type namespace instead of root namespace as
	  default namespace for members. In AddSchemaElement, if the element is
	  a root element never use a "ref" attribute.
	* XmlSchemaImporter.cs: Fixed issue when importing root elements.

svn path=/trunk/mcs/; revision=22064
2004-01-14 17:30:50 +00:00
Lluis Sanchez a88fae3a5d * MapCodeGenerator.cs: Added support for [Flags] enum.
* XmlCodeExporter.cs: Do not add XmlElement attributes if the member is Any.
	* XmlSchemaImporter.cs: Implemented ImportAnyType(). Improved import of
	  encoded array type. Added support for enums with [Flags].
	  In encoded format, unqualified types are schema types by default.

svn path=/trunk/mcs/; revision=21072
2003-12-12 17:04:59 +00:00
Lluis Sanchez 9438297164 * MapCodeGenerator.cs: Made MapCodeGenerator internal.
svn path=/trunk/mcs/; revision=19084
2003-10-15 18:11:33 +00:00
Lluis Sanchez bf5fac805d * MapCodeGenerator.cs: New file. Moved here all code that is common
between XmlCodeExporter and SoapCodeExporter.
	* SoapCodeExporter.cs: Implemented.
	* XmlCodeExporter.cs: Moved common code to MapCodeGenerator.
	* XmlSerializationReaderInterpreter.cs: Fixed problem when reading
	  encoded bare parameter list.
	* XmlTypeMapping.cs: Added method for getting member element by index.

svn path=/trunk/mcs/; revision=19069
2003-10-15 08:18:04 +00:00