* 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)
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.
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
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
* 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
* 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
* 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
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
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
* 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
* 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
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
* 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
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