Commit Graph
476 Commits
Author SHA1 Message Date
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
Gert Driesen 93bfd5d862 * CodeIdentifier.cs: Default ctor is public on 1.0 profile too.
* CodeIdentifiers.cs: Ctor taking bool is 2.0 only.

svn path=/trunk/mcs/; revision=81107
2007-06-30 13:51:21 +00:00
Konstantin Triger 2bc09e2c43 ensure correct behavior in case XmlSchemaProviderAttribute specified attibute does not return schemas
svn path=/trunk/mcs/; revision=80948
2007-06-28 06:21:12 +00:00
Konstantin Triger cc884fc062 add partial support for XmlSchemaProviderAttribute
svn path=/trunk/mcs/; revision=80864
2007-06-27 12:50:39 +00:00
Konstantin Triger 4fa89551db * TypeTranslator.cs:
1. Fix the construction of TypeData for nullable types: it should not
		be primitive since the primitive were loaded in static ctor.
	2. Rename primitiveNullableTypes -> nullableTypes to reflect 
		correctly the field purpose.
	3. Unify synchronization with synchronized hashtable.

svn path=/trunk/mcs/; revision=78002
2007-05-27 12:39:41 +00:00
Konstantin Triger 2e84305b74 fix typo: set IsNullable flag for primitiveNullableTypes
svn path=/trunk/mcs/; revision=77895
2007-05-24 08:50:24 +00:00
Adar Wesley bb05ca1050 2007-05-14 Adar Wesley <[email protected]>
* XmlSchemaExporter.cs: added missing overload for method ExportAnyType.

        * XmlSchemas.cs: added missing methods Add, AddReference, Contains,
        GetSchemas.

        * XmlSerializationReader.cs: added missing method AddReaderCount.

        * XmlSerializationWriter.cs: added missing overload WriteStartElement.

        * XmlSerializer.cs: added missing overload Serialize.


svn path=/trunk/mcs/; revision=77340
2007-05-14 11:48:15 +00:00
Konstantin Triger d86b64b7c2 refactoring for performance
svn path=/trunk/mcs/; revision=76794
2007-05-06 18:05:58 +00:00
Atsushi Eno 044e2c1ec4 2007-04-25 Atsushi Enomoto <[email protected]>
* XmlConvert.cs : MinValue and MaxValue are unchanged by the
	  serialization mode (unlike DateTime.ToString()).

	* XmlCustomFormatter.cs : fix GenerateToXmlString() as well.

	* XmlConvertTests.cs : added test for MaxValue serialization with
	  every XmlDateTimeSerializationMode.


svn path=/trunk/mcs/; revision=76275
2007-04-25 19:31:47 +00:00
Atsushi Eno a1cc211652 2007-04-25 Atsushi Enomoto <[email protected]>
* 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
2007-04-25 18:22:32 +00:00
Atsushi Eno b89066b092 2007-04-25 Atsushi Enomoto <[email protected]>
* XmlSchemas.cs : 1.1-only duplicate check does not seem to be
	  required. This is also a workaround for 1.x ws proxy generation.


svn path=/trunk/mcs/; revision=76237
2007-04-25 08:41:49 +00:00
Atsushi Eno 539a09ff94 2007-04-24 Atsushi Enomoto <[email protected]>
* 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
2007-04-24 03:37:03 +00:00
Atsushi Eno 4d3d5288a1 2007-04-23 Atsushi Enomoto <[email protected]>
* 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
2007-04-23 08:41:41 +00:00
Atsushi Eno ef23f4f0cc 2007-04-20 Atsushi Enomoto <[email protected]>
* XmlTypeMapping.cs, ReflectionHelper.cs,
	  XmlSerializationReaderInterpreter.cs, SerializationCodeGenerator.cs:
	  support instantiation by private constructor.

	* XmlSerializerTests.cs :
	  Added test for serializing private-constructor-only class.


svn path=/trunk/mcs/; revision=76003
2007-04-20 11:13:46 +00:00
Konstantin Triger 93b055b204 do not export twice simple types
svn path=/trunk/mcs/; revision=75964
2007-04-19 17:17:54 +00:00
Atsushi Eno f1502ba6c4 2007-04-10 Atsushi Enomoto <[email protected]>
* TypeData.cs : forgot NET_2_0.


svn path=/trunk/mcs/; revision=75561
2007-04-10 07:01:11 +00:00
Atsushi Eno 444d0efb91 2007-04-10 Atsushi Enomoto <[email protected]>
* TypeData.cs : in get_ListItemTypeData(), check generic ICollection
	  as well as non-generic one. Fixed bug #81341. Though the type check
	  looks like an aggregation of bugfix hacks and there should be some
	  kind of sane refactoring, to throw best-suited errors.


svn path=/trunk/mcs/; revision=75559
2007-04-10 05:09:01 +00:00
Atsushi Eno c4833c5907 2007-02-28 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs : fix wrong name comparison:
	  Name->LocalName. Add hacky TARGET_JVM support (hope it is harmless).


svn path=/trunk/mcs/; revision=73527
2007-02-28 08:40:46 +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
Atsushi Eno 2e220d6ca3 2007-02-19 Atsushi Enomoto <[email protected]>
* XmlTypeMapElementInfo.cs : set nullable if the type is Nullable<T>.

	* XmlReflectionImporterTests.cs : added another test for nullable
	  container.


svn path=/trunk/mcs/; revision=73120
2007-02-19 15:44:36 +00:00
Atsushi Eno ad569e528f 2007-02-19 Atsushi Enomoto <[email protected]>
* 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
2007-02-19 13:56:15 +00:00
Atsushi Eno b2528c6939 2007-02-19 Atsushi Enomoto <[email protected]>
* TypeData.cs, MapCodeGenerator.cs, XmlMemberMapping.cs,
	  TypeTranslator.cs : removed IsGenericNullable and added
	  set_IsNullable so that it could be simpler.


svn path=/trunk/mcs/; revision=73114
2007-02-19 13:21:31 +00:00
Atsushi Eno 99fc1ef28a 2007-02-19 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs, XmlMappingAccess.cs,
	  SerializationCodeGeneratorConfiguration.cs : replaced HookDir with
	  XmlMappingAccess.


svn path=/trunk/mcs/; revision=73113
2007-02-19 13:07:22 +00:00
Atsushi Eno a70a652db2 2007-02-19 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs : hooks won't work unless they are
	  set. For WriteStartElement() it could simply embed the names.


svn path=/trunk/mcs/; revision=73112
2007-02-19 13:00:08 +00:00
Atsushi Eno 4f040c7848 2007-02-14 Atsushi Enomoto <[email protected]>
* XmlTypeMapMember.cs : don't use readonly [Foo]Specified property
	  as nil-condition member. Fixed bug #80759.

	* XmlSerializerTests.cs : added HasFieldSpecifiedButIrrelevant().


svn path=/trunk/mcs/; revision=72844
2007-02-14 15:59:22 +00:00
Atsushi Eno 69a53ae15c 2007-02-07 Atsushi Enomoto <[email protected]>
* SoapReflectionImporter.cs : for primitive types, set predefined
	  namespaces, regardless of the actual specification.

	* SoapReflectionImporterTests.cs : removed some NotWorking.


svn path=/trunk/mcs/; revision=72455
2007-02-07 20:48:48 +00:00
Atsushi Eno 538b940300 2007-02-07 Atsushi Enomoto <[email protected]>
* 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
2007-02-07 18:47:55 +00:00
Atsushi Eno 1552791781 2007-02-07 Atsushi Enomoto <[email protected]>
* 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
2007-02-07 17:11:43 +00:00
Atsushi Eno 0544130e97 2007-02-07 Atsushi Enomoto <[email protected]>
* XmlSerializationWriter.cs : callbacks could be kept null.


svn path=/trunk/mcs/; revision=72434
2007-02-07 16:51:46 +00:00