Commit Graph
6 Commits
Author SHA1 Message Date
Atsushi Eno 693ed85130 Fix bug #707434, check order only when applicable.
Based on the input by Scott Fluto.
2011-08-03 05:35:26 +09:00
Atsushi Eno 4fab2dc4c3 Fix bug #703910 - implement Order support in XmlSerializer. 2011-07-21 04:57:32 +09:00
Gert Driesen b10e9acc58 * 82078.xsd: Added new complex type as test for duplicate field
name.
* MapCodeGenerator.cs: Ensure fields that back properties are unique.
* XmlSerializationReaderTests.cs: Marked HandleOutAttributeParameters 
test as NotDotNet on 1.0 profile.
* XmlCodeExporterTests.cs: Improved test for duplicate identifiers.
Fixed ExportTypeMapping_Root and ExportTypeMapping_Field tests to
pass on .NET 2.0.

svn path=/trunk/mcs/; revision=99345
2008-03-30 15:25:11 +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 fe34bc872c * XmlSerializationWriterTests.cs: Use Assert instead of deprecated
Assertion class. Added tests for FromEnum, WriteXsiType, 
WriteTypedPrimitive and WritePotentiallyReferencingElement. Changed
accessibility of Reset and Content on XmlSerializationWriterTester
and added public Execute methods for WritePotentiallyReferencingElement
and WriteTypedPrimitive, to allow this class to be useful for tests
that have effect on the prefix for other tests.
* XmlSerializationReaderTests.cs: Added tests for ToEnum.
* System.Xml_test.dll.Sources: Added XmlSerializationReaderTests.cs.
* XmlSerializationWriter.cs: Implemented 2.0 version of FromEnum, and
CreateInvalidEnumValueException. Set eol-style to native.
* XmlCustomerFormatter.cs: Added FromEnum overload that takes name of
enum for which string value must be created. Set eol-style to native.
Modified FromEnum to behave more like MSFT's implementation:
- treat value as bit field.
- no longer return empty string if the value matches an id for which there's 
no corresponding name.
- if one of the ids has value 0 and there's a match for the enum value
(with a zero length XML name) or the enum value is 0, then return the 
corresponding XML for the id with value 0.
- in 2.0 profile, throw InvalidOperationException if no match is found
for (part of) the enum value.
Modifies ToEnum to match the MSFT implementation (as described in
.NET 2.0 SDK):
- Expect hashtable containing enum names as key, and corresponding
integral numbers as value.
- Do not report exception for whitespace-only value.
- Support space (MS docs are not clear about this) delimited list 
of names.
- typeName is only used to construct exception message.

svn path=/trunk/mcs/; revision=56700
2006-02-09 13:30:02 +00:00