* XmlConvert.cs : in 2.0, use F instead of f in dateTime formatting.
* XmlCustomFormatter.cs :
in 2.0, use F instead of f for dateTime formatting.
* XmlSerializationWriterTests.cs, XmlSerializerTests.cs :
fixed wrong dateTime formatting tests.
svn path=/trunk/mcs/; revision=76268
* XmlCustomFormatter.cs : ditto for reader method generation.
* SerializationCodeGenerator.cs : for generic nullable values it
needs to store ReadNullableString() result to a temporary variable.
* XmlSerializerTests.cs : another case on #80759 from gert.
svn path=/trunk/mcs/; revision=76160
* TypeData.cs, XmlCustomFormatter.cs : generic nullable values did
not fit with non-nullable formatting. Fixed#80759 regression.
* XmlSerializerTests.cs :
added missing test from 80759, and marked similar but different one
from the same bug as not working.
svn path=/trunk/mcs/; revision=76099
* 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
* 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
* XmlTypeMapElementInfo.cs : set nullable if the type is Nullable<T>.
* XmlReflectionImporterTests.cs : added another test for nullable
container.
svn path=/trunk/mcs/; revision=73120
* XmlReflectionImporter.cs : CanBeNull() should return true when the
argument is generic nullable value type.
* XmlReflectionImporterTests.cs : added test for nullable int import.
svn path=/trunk/mcs/; revision=73117
* SoapReflectionImporter.cs : for primitive types, set predefined
namespaces, regardless of the actual specification.
* SoapReflectionImporterTests.cs : removed some NotWorking.
svn path=/trunk/mcs/; revision=72455
* 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
* XmlSerializationWriter.cs : WriteTypedPrimitive() infers the type
when the name is null (almost no need to do this, but it is easier
to remove NotWorking from extraneous tests and let them hush than
removing them).
* XmlSerializationWriterTests.cs : removed some NotWorking.
svn path=/trunk/mcs/; revision=72436
* TypeData.cs : added get_IsGenericNullable.
* MapCodeGenerator.cs : in GetDomType(), return Nullable<T> when
the TypeData.IsGenericNullable.
Use GetDomType() instead of CodeTypeReference.ctor() to not lose
Nullable<T> info.
* XmlSchemaImporter.cs : added isNullable argument to GetTypeData()
so that it won't XmlSchemaElement.IsNillable.
* TypeTranslator.cs :
Fixed wrong TypeData modification against non-nullable stuff.
Added another GetTypeData() that takes isNullableRuntimeType so
that it won't miss XmlSchemaElement.IsNillable.
Added another GetPrimitiveTypeData() that takes nullable.
* XmlSchemaImporterTests.cs :
test that <xs:element nillable='true' ...> is mapped to Nullable<T>.
svn path=/trunk/mcs/; revision=71304
* TypeData.cs : reject generic type definitions.
* TypeTranslator.cs : Make generic type names in XML compatible with
.net: foo_x0060_1 -> fooOfString.
* XmlSerializerTests.cs : most of generic tests are working now.
* XmlReflectionImporterTests.cs : test for rejecting generic type
definition.
svn path=/trunk/mcs/; revision=71001
* SerializationCodeGenerator.cs, XmlCustomFormatter.cs :
GenerateToXmlString() needed hexBinary support as well. Since
XmlConvert.[To|From]BinHexString() are internal, use reflection.
Really fixed bug #79989 and #79990 for generated serializers.
* XmlSerializerTests.cs :
added base64 tests which is similar to hexBinary.
svn path=/trunk/mcs/; revision=68927
* XmlSchemaExporter.cs: Emit xml name of enum-based default values.
Set XmlSchemaAttribute.Use to Required if no default value is defined,
and member is not an optional value type. Element should have minOccurs
1 if value type member has default value. Output flag enum type as
xsd list with restriction.
* XmlReflectionImporter.cs: Removed special casing of enums. Instead
of passing namespace of XmlAttribute to ImportTypeMapping, use the
default namespace for importing the member type.
svn path=/trunk/mcs/; revision=68887
* XmlSerializerTests.cs : added tests for serialization of generic types.
* DeserializeTests.cs : added tests for deserialization of generic types.
* XmlSerializerTestClasses.cs : added classes for tests which use generic types.
svn path=/trunk/mcs/; revision=68886
* XmlReflectionImporter.cs : implemented several missing check and
support for XmlArrayAttribute. Fixed bug #78042.
* XmlSerializerTests.cs : added tests for XmlArrayAttribute support.
svn path=/trunk/mcs/; revision=68792
Fixed bug #78611.
* TypeData.cs, TypeTranslator.cs: improved TypeData to actually store
"nullable" information. Introduced new primitiveNullableTypes pool
whose TypeData has 'true' for new IsNullable property. This
property is also used for non-primitive types.
* XmlReflectionImporter.cs : there, use TypeData.IsNullable instead
of IsValueType, to handle nullable types.
* XmlReflectionImporterTests.cs : added test for class that contains
nullable value type field whose XmlElementAttribute IsNullable.
svn path=/trunk/mcs/; revision=68341
* TypeTranslator.cs : (GetTypeData) when the argument type is
Nullable<T>, use T instead. At run time (on both interpreter and
generated code) it is converted to T. Fixed bug #79803.
* XmlSerializerTests.cs : added test for nullable type.
svn path=/trunk/mcs/; revision=68175
* XmlSerializerTests.cs : test for basic generic type support with
code generation.
* SerializationCodeGenerator.cs, TypeData.cs :
Now we differentiate TypeName, FullTypeName C# type names. It is
to create valid C# sources especially for generic types.
Fixed bug #79657.
svn path=/trunk/mcs/; revision=68058
* SerializationCodeGenerator.cs,
SerializationCodeGeneratorConfiguration.cs :
make "XmlSerializerContract" and "BaseXmlSerializer" customizible.
(or it is impossible to use genxs more than twice in an assembly.)
* XmlSerializerImplementationTests.cs :
another custom implementation case.
svn path=/trunk/mcs/; revision=67857
Fixed bug #77117.
* XmlReflectionImporter.cs : Compute nullable correctly. Elements are
nillable when its type is a reference type.
* XmlSchemaExporter.cs :
Set XmlTypeMapElementInfo.IsNullable from XmlTypeMapping.
Set XmlSchemaElement.IsNillable from XmlTypeMapElementInfo.
* XmlSchemaExporterTests.cs :
fixed almost all test cases which expected totally wrong schemas.
Schema elements are all nillable unless it is of value type.
svn path=/trunk/mcs/; revision=67662
* XmlSchemaImporter.cs : top-level element might also have no type
name specification, so just compare ElementType with anyType.
* XmlSchemaImporterTests.cs :
added DefaultTypeTopLevelElementImportsAllComplexTypes().
svn path=/trunk/mcs/; revision=67595
* XmlSchemaImporter.cs : attributes might overlap by extending
base content models. Since invalid content models are rejected by
Compile(), simply ignore duplicating attributes. Note that it is
basically hack, which should not skip derived ones but use them (but
it is mostly harmless since the result is very unlikely to differ).
* XmlSchemaImporterTests.cs :
added ImportComplexDerivationByExtension().
svn path=/trunk/mcs/; revision=67581
* XmlSchemaImporter.cs : when top-level element is xs:anyType, all
complexTypes must be also imported.
* XmlSchemaImporterTests.cs :
added AnyTypeTopLevelElementImportsAllComplexTypes().
svn path=/trunk/mcs/; revision=67569
* 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
* 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
* 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