505 Commits
Author SHA1 Message Date
Neil Mayhew 43ccb972b4 [Sys.Xml] Allow qualified names in XmlAttribute serialization
This fixes Mono bug #594490
(https://bugzilla.novell.com/show_bug.cgi?id=594490).
2014-02-27 16:01:50 +01:00
Martin Baulig c4941b96b6 Oops, fix the build. 2014-02-25 19:11:05 +01:00
Martin Baulig 2d573ae1ce [Sys.Xml]: Allow XElement to be deserialized; fixes #12571. 2014-02-25 18:59:29 +01:00
Atsushi Eno d21b0aa3d9 Fixed bug #4141 - XmlSchemaImporter needs to consider attributeGroupRef in some case. 2013-08-09 17:22:38 +09:00
Atsushi Eno 53a68c9e20 Fixed bug #4668 - C# compiler doesn't like decimal in custom attribute values, so use string. 2013-08-09 17:03:40 +09:00
Martin Baulig 3fee2dd792 Trivial API additions. 2013-03-12 17:22:59 -04:00
Rodrigo Kumpera 8752d92528 Kill MOONLIGHT from System.Xml. 2013-02-11 16:03:40 -05:00
Lluis Sanchez d3fdb925ec Fix bug 9193 - XmlSerialization not properly deserializing a List 2013-01-09 13:54:47 +01:00
Roman Zavalov d491eb18e4 Fixed Choice ordered read bug #2907 2012-12-12 12:33:26 +04:00
Rodrigo Kumpera 3674b1167f Revert "Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes"
This reverts commit 8bb9b4409d, reversing
changes made to a5dd9d6910.
2012-12-11 15:42:12 -05:00
Miguel de Icaza 8bb9b4409d Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes
Fix for issue 2907: XML "choice" not correctly processed during deserialization
2012-12-07 13:57:58 -08:00
Lluis Sanchez e06cde993e Fix XML serialization bug
When reflecting a class which inherits serializable members from a
base class, the members of the base class must be serialized using the
namespace set in the subclass unless a namespace has been explicitly
set in the base class. Before the fix, the members were always
serialized using the namespace of the base class, even when not set
(in which case it was using the default empty namespace).

Fixes bug 8468 - XML serialization problem.
2012-11-19 21:18:14 +01:00
Nicolas Raoul b826dc791d do not check order sequence if option /order was not used 2012-11-06 10:34:15 +09:00
Nicolas Raoul f72fc52f07 Fix for issue 2907. I took Roman Zavalov's patch at https://bugzilla.xamarin.com/show_bug.cgi?id=2907#c10 and reverted the numerous formatting changes that were obscuring the real changes, hopefully making the diff clearer 2012-11-02 16:26:47 +09:00
Andres G. Aragoneses 48c73cfb3c [System.XML]: Do not set XmlTypeMapElementInfo.IsNullable if it's already True
The IsNullable attribute in XmlElementAttribute is false by default,
so when not using it in a member which was already nullable
(i.e. Nullable<DateTime>), Mono was overriding the attribute causing
a FormatException later if an xsi:nil value was found when deserializing.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=7613
2012-10-03 12:08:16 +01:00
Marek Safar d5d4b9c22b Fix some warnings 2012-06-08 12:48:08 +01:00
Marek Safar 8566a284a2 Update more 4.5 api 2012-06-08 11:44:55 +01:00
Lluis Sanchez aabbc960b7 Improve date serialization compatibility with third party web services
Make XmlCustomFormatter.cs more liberal about the date formats it accepts.
Many third party web services do not format date exactly at 'yyyy-mm-dd'.
The Microsoft implementation is more liberal about accepting other formats
and so the current Mono implementation breaks projects that consume third
party web services when they are ported to Mono.
Based on a patch by Aaron Roydhouse.
2012-06-05 12:35:52 +02:00
Martin Baulig 7d170f400d Sync parameter names with .NET. 2012-06-03 04:02:28 +02:00
Miguel de Icaza ae0feab435 Removal of NET_1_1 defines and some NET_2_0; Both defines are true these days in Mono, no versions prior to 2.0 are supported 2012-06-01 18:04:24 -04:00
Marek Safar c81c35a8c6 Fix more xml serializer tests 2012-05-31 13:23:55 +01:00
Rolf Bjarne Kvinge b3014f2bcc Fix XmlAttributes to ignore all XmlAttributes if XmlIgnore is present 2012-04-19 23:04:16 +02:00
Rolf Bjarne Kvinge 5d7c168eba Ignore XmlIgnore attributes when importing members in XmlReflectionImporter. Fixes #4367. 2012-04-19 23:04:15 +02:00
Miguel de Icaza 07b6638343 Apply patch from Tom Hindle to fix ##2893 and add a test case.
The serializer interpreted was broken, but the compiled version was fine,
running MONO_XMLSERIALIZER_THS=0 allowed this to run
2012-01-14 15:35:45 -05:00
Miguel de Icaza 62d7430864 XmlSerializer: Add support to serialize nullable types when the XmlElement has explicity set the DataType
The existing code had a special code path for handling nullables that
ignored the DataType component.

This patch splits the nullable test away, allows the specified XmlDataType
to be probed and then performs the standard type lookup mechanism.

This allows this:

        [XmlElement ("MyNullableTime", DataType="time", IsNullable=true)]
        DateTime? myTime;

To be serialized as a "time" instead of a "datetime".

Fixes bug #329
2012-01-03 19:38:13 -05:00
Lluis Sanchez 4bf60c9c50 [System.Xml] Fix handling of XmlSchemaForm when importing elements
When the schema for is not explicitly set for an element, get the default form specified in the schema, and use 'unqualified' if there is no other default. This fixes bug #41.
2011-10-26 11:27:34 +02:00
Miguel de Icaza 8c4b3c1aca Fix for 1461: Microsoft's generated deserializer call CollapseWhitespace extensively 2011-10-17 17:06:41 -04:00
Atsushi Eno 0ac09f4e2b Merge pull request #146 from flutos/207ce0bccceec3ff7860ea986086fedb5a92d822
fix for bug 708178 that would fail if the type wasnt IEnumerable, should check if it implement IEnumerable rather than is IEnumerable
2011-08-03 17:05:06 -07:00
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
scott fluto 207ce0bccc [708178] - Type check invalid and breaks XmlSerialization if serializing ICollection<> types 2011-07-28 15:19:43 -06:00
Atsushi Eno 4fab2dc4c3 Fix bug #703910 - implement Order support in XmlSerializer. 2011-07-21 04:57:32 +09:00
Atsushi Eno 2cc686a3af Fix bug 704813: just ignore members of type IEnumerable`1 without Add(). 2011-07-16 06:48:41 -07:00
Atsushi Eno 01308ef4ea Add test for XmlMembersMapping.TypeName and .Namespace (not very useful yet...) 2011-05-27 17:29:05 +09:00
Atsushi Eno 1550d9831a Check invalid recursion of xs:group use. Fixed bug #650117. 2011-05-18 01:09:21 +09:00
Atsushi Eno e1f4f82a0a Do not import xs:any member as XmlElement[]. Create a wrapper class instead.
Part of bugfix #670945.
2011-05-16 18:45:08 +09:00
Lluis Sanchez 3175239e84 [Web Services] Fix regression caused by previous commit
Fixes a regression caused by the implementation of support
for optional parameters. GlobalIndex was not being set
when using SOAP RPC protocol.
2011-05-06 18:39:51 +02:00
Sebastien Pouliot 4925054bb0 Make some S.X.S types compatible with the SL API (for SDK)
* 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)
2011-05-06 08:40:41 -04:00
Lluis Sanchez a8aa1e0653 [Web.Services] Add support for optional parameters
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.
2011-04-28 18:33:59 +02:00
Atsushi Eno 2f86157982 XmlSerializer code generator was generating wrong char literal.
Fixed bug #673019.
2011-04-28 15:41:27 +09:00
Atsushi Eno 8fe0d1c078 Prepare for new System.Xml.Serialization.dll build (moonlight sdk assembly). 2011-04-15 15:00:40 +09:00
Lluis Sanchez 0943712481 Fix several issues in the code generator
Issues include: casts not being properly generated for nullable
types, missing cast when the type of a member does not match
the forced serialization type, and incorrect code generated
for handling [XmlText] members.
2010-12-13 16:51:44 +01:00
Lluis Sanchez 0dcc87e549 Fix code generation issue with nested generic types
The type argument list for generic nested types include
all types arguments for the whole declaring type chain.
When generating the C# name of the class, each type
argument has to be assigned to the correct class in
the chain.
2010-12-13 13:49:35 +01:00
Lluis Sanchez 3dc10b0fd1 Throw correct exceptions when using generated serializer
Invocations to generated serializers are done through
reflection, so exceptions are masked by TargetInvocationException.
The inner exception has to be rethrown so that the client
code gets the correct exception.
2010-12-13 13:49:34 +01:00
Jb Evain b2b1e43507 Fix the monodroid and monotouch profile builds 2010-09-08 18:48:36 +02:00
Jb Evain 0253e041a7 Enable the System.Xml build for monodroid 2010-09-08 18:48:29 +02:00
Raja R Harinath b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
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