Commit Graph
368 Commits
Author SHA1 Message Date
Atsushi Eno 6e5c07fd59 2010-03-29 Atsushi Enomoto <[email protected]>
* XmlTypeMapping.cs, XmlReflectionImporter.cs: XmlRoot takes higher
	  priority to XmlSchemaProvider QName.
	  This fixes WCF EndpointAddress serialization.

	* XmlSerializerTests.cs : test for XmlRoot and XmlSchemaProvider
	  QName conflict case.


svn path=/trunk/mcs/; revision=154368
2010-03-29 12:48:29 +00:00
Jb Evain 846150badd use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153673
2010-03-16 12:31:23 +00:00
Atsushi Eno 1770b033b6 2010-03-10 Atsushi Enomoto <[email protected]>
* XmlAnyElementAttribute.cs : add internal IsNullableSpecified
	  (for moonlight compatibility).
	* XmlChoiceIdentifierAttribute.cs : implement MemberInfo (ditto).


svn path=/trunk/mcs/; revision=153394
2010-03-10 10:32:21 +00:00
Atsushi Eno 95aee05170 2010-03-08 Atsushi Enomoto <[email protected]>
* XmlSerializationWriter.cs : namespaces argument could be null.
	  MS generated serializers often pass null here.


svn path=/trunk/mcs/; revision=153250
2010-03-08 12:42:52 +00:00
Atsushi Eno 0f1cffee4c 2010-01-28 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs : generate valid code for non-
	  identifier names. This should fix bug #488293.


svn path=/trunk/mcs/; revision=150356
2010-01-28 08:36:05 +00:00
Atsushi Eno 2866de3175 2010-01-26 Atsushi Enomoto <[email protected]>
* 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
2010-01-26 07:06:51 +00:00
Atsushi Eno 6811013bfb 2010-01-06 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs : enum value identifiers should be
	  escaped with '@'. Fixed bug #566370.

	* XmlSerializerTests.cs : added test for #566370.


svn path=/trunk/mcs/; revision=149104
2010-01-06 04:02:02 +00:00
Atsushi Eno aef46c7bed 2009-03-13 Atsushi Enomoto <[email protected]>
* XmlRootAttribute.cs : it is also expected to have
          internal property for SL2.



svn path=/trunk/mcs/; revision=129290
2009-03-13 15:22:10 +00:00
Atsushi Eno ed25b28b95 2009-03-13 Atsushi Enomoto <[email protected]>
* XmlArrayItemAttribute.cs, XmlElementAttribute.cs,
	  XmlAnyElementAttribute.cs : added more 2.1 obstacles.


svn path=/trunk/mcs/; revision=129247
2009-03-13 07:28:04 +00:00
Atsushi Eno 00eeda36b0 2009-03-13 Atsushi Enomoto <[email protected]>
* XmlChoiceIdentifierAttribute.cs : added internal MemberInfo
	  property for SL2.


svn path=/trunk/mcs/; revision=129245
2009-03-13 07:16:28 +00:00
Atsushi Eno 019345956c 2009-03-13 Atsushi Enomoto <[email protected]>
* SerializationSource.cs, KeyHelper.cs : split out KeyHelper from
	  SerializationSource as the class is going to be used in 2.1 too.
	* XmlRootAttribute.cs : use KeyHelper above to add internal Key
	  property that is used in SL2 System.Xml.Serialization.dll.

	* System.Xml.dll.sources, net_2_1_raw_System.Xml.dll.sources :
	  added KeyHelper.cs.


svn path=/trunk/mcs/; revision=129243
2009-03-13 06:59:28 +00:00
Geoff Norton 869f7efb5f 2009-02-19 Geoff Norton <[email protected]>
* SerializationSource.cs: KeyHelper is needed by
        the 2.1 profile now.

svn path=/trunk/mcs/; revision=127368
2009-02-19 05:46:05 +00:00
Atsushi Eno c88cc51658 2009-01-22 Atsushi Enomoto <[email protected]>
* XmlSchemaImporter.cs : hack ImportSchemaType().


svn path=/trunk/mcs/; revision=124164
2009-01-22 04:55:40 +00:00
Gonzalo Paniagua Javier 070f6cbea3 2008-12-10 Gonzalo Paniagua Javier <[email protected]>
* XmlSerializer.cs: updated to work with shadowcopy fixes.


svn path=/trunk/mcs/; revision=121275
2008-12-11 04:19:05 +00:00
Atsushi Eno ae6c7511d1 Fix for bug #430759.
svn path=/trunk/mcs/; revision=117965
2008-11-05 11:54:29 +00:00
Atsushi Eno 11ab97e09f 2008-09-19 Atsushi Enomoto <[email protected]>
* XmlSerializer.cs : revert previous change and fix sys.data tests.


svn path=/trunk/mcs/; revision=113521
2008-09-19 12:47:57 +00:00
Atsushi Eno 0f484f3d35 2008-09-17 Atsushi Enomoto <[email protected]>
* XmlSerializer.cs : in 2.0 profile it seems to create XmlReader
	  for stream and textreader, that skips whitespaces.


svn path=/trunk/mcs/; revision=113307
2008-09-17 13:29:18 +00:00
Atsushi Eno dfa3a04f22 2008-09-02 Atsushi Enomoto <[email protected]>
* 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
2008-09-02 16:56:08 +00:00
Jb Evain 24fddc33da sl2b2 update
svn path=/trunk/mcs/; revision=110955
2008-08-19 16:26:20 +00:00
Atsushi Eno c470cdae3f 2008-07-10 Atsushi Enomoto <[email protected]>
* XmlSerializationWriter.cs : more helpful error message.


svn path=/trunk/mcs/; revision=107645
2008-07-10 14:32:47 +00:00
Atsushi Eno 92573b4266 2008-07-09 Atsushi Enomoto <[email protected]>
* MapCodeGenerator.cs : use explicit element name for explicitly added
	  XmlElementAttribute. (exposed by some product from some company.)


svn path=/trunk/mcs/; revision=107530
2008-07-09 10:52:10 +00: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
Atsushi Eno 11f165cf56 2008-06-04 Atsushi Enomoto <[email protected]>
* XmlSerializationReader.cs : in ReadXmlDocument(), MoveToContent()
	  is required after ReadStartElement(). Fixed bug #393406 (without
	  unit test; no simple way to do that :( ).


svn path=/trunk/mcs/; revision=104846
2008-06-04 10:12:51 +00:00
Atsushi Eno da257a4cbb 2008-04-11 Atsushi Enomoto <[email protected]>
* XmlTypeMapping.cs : .NET 2.0 has a weird behavior that swallows
	  exception from IXmlSerializable.GetSchema().

	* XmlSerializerTestClasses.cs, XmlSerializerTests.cs : added test
	for IXmlSerializable serialization whose GetSchema() borks.


svn path=/trunk/mcs/; revision=100415
2008-04-11 06:34:35 +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
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
Lluis Sanchez 920e61fefd * MapCodeGenerator.cs, XmlTypeMapMember.cs, XmlTypeMapMemberElement.cs:
If a value type field has the IsNullable property set to true,
  generate it as System.Nullable<T>.

svn path=/trunk/mcs/; revision=99045
2008-03-26 17:34:17 +00:00
Lluis Sanchez 3b8d404393 * XmlSchemaImporter.cs: Fix problem with primitive types with a forced
base class. It happens for example when a web service declares a
  soap header of type bool. The schema exporter needs to generate a
  subclass of SoapHeader for that header type. But if bool is used in
  the parameters, it must use System.Boolean, not the SoapHeader
  subclass. The solution is to store primitive types with a forced
  base class in a different table. In this way it is possible to have
  two maps for primitive types: one with the forced base class
  (returned by ImportDerivedTypeMapping) and one with the regular
  primitive map. Fixes bug #336739.

svn path=/trunk/mcs/; revision=99013
2008-03-26 11:33:13 +00:00
Atsushi Eno 8f7afecbe1 2008-03-21 Atsushi Enomoto <[email protected]>
* XmlReflectionImporter.cs : set key for imported type mapping so
	  that generated serializer does not result in duplicate key error.
	  Fixed bug #372780.


svn path=/trunk/mcs/; revision=98729
2008-03-21 12:11:42 +00:00
Arina Itkes 72f3e9de91 Fix for exporting of a generated typed DataTable and typed DataSet. Bug 8894
svn path=/trunk/mcs/; revision=94667
2008-02-03 10:05:06 +00:00
Atsushi Eno 9bf499089c 2008-01-24 Atsushi Enomoto <[email protected]>
* TypeData.cs : fixed setter which did not actually see the argument.
	* XmlTypeMapElementInfo.cs : some cosmetic fixes for gendarme-
	  reported issues.


svn path=/trunk/mcs/; revision=93763
2008-01-24 03:55:40 +00:00
Atsushi Eno 5336a413fe 2007-11-09 Atsushi Enomoto <[email protected]>
* XmlTypeMapping.cs : to get schema provider method, check base
	  types as well (i.e. FlattenHierarchy). Otherwise typed DataSet
	  cannot be reflected in 2.0.


svn path=/trunk/mcs/; revision=89307
2007-11-09 10:12:48 +00:00
Atsushi Eno 439df4a604 2007-11-02 Atsushi Enomoto <[email protected]>
* TypeTranslator.cs : for duration, rather use primitiveTypes than
	  nameCache, and hence TimeSpan could be serialized just as custom
	  type. Fixed bug #338705.

	* XmlSerializerTests.cs : added test for bug #338705.


svn path=/trunk/mcs/; revision=88729
2007-11-02 16:25:26 +00:00
Atsushi Eno d9b24722e2 2007-11-01 Atsushi Enomoto <[email protected]>
* XmlSchemaImporter.cs : simpleType is allowed to be imported.
	  (Part of #336739 fix.)

	* XmlSchemaImporterTests.cs : test for importing simple-typed
	  top-level element.


svn path=/trunk/mcs/; revision=88636
2007-11-01 11:38:14 +00:00
Atsushi Eno 756ab6c79b 2007-10-30 Atsushi Enomoto <[email protected]>
* XmlConvert.cs : ToDateTime(string,string) should use ParseExact(),
	  not Parse(). Use 'K' for roundtrip format.

	* XmlCustomFormatter.cs : use RoundtripKind when converting to and
	  from DateTime.

	* XmlConvertTest.cs : added test for DateTime roundtrip.

	* XmlSerializerTests.cs : added test for bug #337729.


svn path=/trunk/mcs/; revision=88448
2007-10-30 12:33:34 +00:00
Atsushi Eno 1bef3d3d95 2007-10-30 Atsushi Enomoto <[email protected]>
* MapCodeGenerator.cs : found the true culprit for the previous
	  attempt to the fix.

	* XmlCodeExporterTests.cs : enable the previous test again.


svn path=/trunk/mcs/; revision=88365
2007-10-29 10:55:37 +00:00
Atsushi Eno d903039b06 2007-10-30 Atsushi Enomoto <[email protected]>
* MapCodeGenerator.cs, XmlSchemaImporter.cs: revert the previous
	  change; the type is included in the output, but it should not be
	  the base type.

	* XmlCodeExporterTests.cs : disable the previous test; it's reverted.


svn path=/trunk/mcs/; revision=88364
2007-10-29 10:41:53 +00:00
Atsushi Eno 1d08a72b56 2007-10-30 Atsushi Enomoto <[email protected]>
* MapCodeGenerator.cs, XmlSchemaImporter.cs: when a complexType has
	  simple content extension/restriction and the simple base type is
	  schema-defined, it must be written in exported code. Fixed (part
	  of?) bug #336739.

	* XmlCodeExporterTests.cs : added test for (part of?) bug #336739,
	  base simple content enum type output.


svn path=/trunk/mcs/; revision=88363
2007-10-29 10:23:35 +00:00
Atsushi Eno 3ed900c939 2007-10-26 Atsushi Enomoto <[email protected]>
* TypeTranslator.cs, XmlCustomFormatter.cs : looks like duration is
	  serialized to System.String, not TimeSpan. Fixed bug #336625.

	* XmlSerializerTests.cs : added test for DataType in [XmlElement].


svn path=/trunk/mcs/; revision=88247
2007-10-26 04:00:22 +00:00
Atsushi Eno 090a3ab56b 2007-09-27 Atsushi Enomoto <[email protected]>
* XmlMapping.cs : added XsdElementName.
	* XmlSerializationWriter.cs : some more implementation.


svn path=/trunk/mcs/; revision=86507
2007-09-27 15:36:14 +00:00
Atsushi Eno 6959e0c1d3 2007-09-25 Atsushi Enomoto <[email protected]>
* 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
2007-09-25 17:35:18 +00:00
Atsushi Eno 1e597c4439 2007-09-25 Atsushi Enomoto <[email protected]>
* 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
2007-09-25 15:55:48 +00:00
Atsushi Eno 6f08261d8a 2007-08-21 Atsushi Enomoto <[email protected]>
* XmlReflectionImporter.cs : do not reject XmlArrayAttribute on
	  byte[] (processed as primitive SchemaType). Fixed bug #81880.

	* XmlReflectionImporterTest.cs : test for bug #81880.


svn path=/trunk/mcs/; revision=84548
2007-08-21 13:10:37 +00:00
Atsushi Eno ba79336274 2007-08-21 Atsushi Enomoto <[email protected]>
* XmlSchemaProviderAttribute.cs : added IsAny.


svn path=/trunk/mcs/; revision=84544
2007-08-21 12:25:24 +00:00
Atsushi Eno 1da39baea9 2007-08-21 Atsushi Enomoto <[email protected]>
* XmlSerializationReader.cs :
	  implemented ReaderCount and CheckReaderCount().


svn path=/trunk/mcs/; revision=84543
2007-08-21 12:21:01 +00:00
Atsushi Eno 32f6484459 2007-08-21 Atsushi Enomoto <[email protected]>
* MapCodeGenerator.cs : avoid possible duplicates in generated field 
	  names. Fixed bug #82078.

	* XmlCodeExporterTests.cs : test for bug #82078.

	* 82078.xsd : new test file.

	* Makefile : extra distfiles (82078.xsd).


svn path=/trunk/mcs/; revision=84531
2007-08-21 09:24:42 +00:00
Atsushi Eno c0cd23c750 2007-08-10 Atsushi Enomoto <[email protected]>
* XmlSerializer.cs : use WhitespaceHandling.Significant when creating
	  XmlTextReader. Fixed bug #82372. No tests should be added for it.


svn path=/trunk/mcs/; revision=83799
2007-08-10 07:04:54 +00:00
Konstantin Triger 1024996147 do not output xml declaration while serializing XmlDocument
svn path=/trunk/mcs/; revision=82929
2007-07-29 11:53:24 +00:00
Atsushi Eno 6b03552e04 2007-07-26 Atsushi Enomoto <[email protected]>
* 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
2007-07-26 00:15:11 +00:00
Vladimir Krasnov 09730e286f * XmlTypeMapping.cs: fixed XmlSerializableMapping ctor, corrected when qualified name is empty
* XmlSchemaExporter.cs: fixed SetSchemaXmlSerializableType when schema provider method returns null schema

svn path=/trunk/mcs/; revision=82476
2007-07-23 10:57:55 +00:00