Marcos Henrich
916121f3d7
Property with attribute XmlTest is now set from ReadString only.
...
Before the change when the property default value was not null or empty the deserialized value would be the concatenation of the default value and the serialized value.
The correct behavior is to use the serialized value only.
Fixes 18908.
2014-09-26 10:35:57 +01:00
Marcos Henrich
5fc6ecd7c7
If not specified assume that array items are nullable. Fixes #19012 .
2014-09-15 16:57:13 +01:00
Marcos Henrich
be02242f8b
Ignore method ShouldSerialize if it is a generic.
2014-09-15 13:02:00 +01:00
Marcos Henrich
79de2b62f9
Added optional serialization based on ShouldSerialize{V}.
...
SerializationCodeGenerator and XmlSerializationWriterInterpreter will no longer serialize an attribute named {V} if its object has a method named ShouldSerialize{V}() that returns false.
{V}Specified now is also checked to be true before serializating the attribute even if it is a property that is not settable.
Fixes #1852 .
2014-09-15 13:02:00 +01:00
Marcos Henrich
1ec4bd5c26
Fixed NullReferenceException.
2014-09-15 13:01:04 +01:00
Marcos Henrich
f8ff518ebe
When needed serialized objects are now implicitly converted.
...
Fixes #20403 .
2014-09-10 17:25:44 +01:00
Marcos Henrich
5fdbad2444
Changed method ImplicitConvert to internal static.
2014-09-10 17:24:38 +01:00
Marcos Henrich
0804720aaa
ImplicitConvert was using method with wrong parameter and return type.
2014-09-10 17:23:44 +01:00
Zoltan Varga
03aee949f1
Merge pull request #1200 from akoeplinger/remove-jvm
...
[Cleanup] Remove TARGET_JVM
2014-08-28 19:17:43 -04:00
Marcos Henrich
baa495e78b
Serializer were not generated if generationThreshold was changed.
2014-08-27 22:20:00 +08:00
Marcos Henrich
9d2ede6010
Fixed serialization of XmlNode field with attribute XmlAnyElement.
...
Fixes #3211 .
2014-08-22 21:50:40 +08:00
Marcos Henrich
24bfa83876
Added missing XmlTypeMapping.IsAny logic.
...
This complements commit 05444c7c1c570db730f17b6d15dd66d3728b6.
2014-08-22 21:50:39 +08:00
Marcos Henrich
9f52a988cf
Replaced incorrect bool.ToString() by GetLiteral(bool).
2014-08-22 21:50:39 +08:00
Marcos Henrich
1e5ce9cc4f
Added GetTypeFullName, fixes wrong nullable valuetype names.
2014-08-22 21:50:38 +08:00
Marcos Henrich
526cbd5ced
Changed UsageCount and generationThreshold to zero based.
2014-08-22 21:46:38 +08:00
Marcos Henrich
8fa4a77948
Xml Serialization of Base class w/o a parameterless constructor.
...
Removed validation code that did not allowed serialization of base classes without a parameterless constructor.
Fixes #6913 .
2014-08-18 15:27:53 +01:00
Marcos Henrich
38d56909d9
Fixed XmlSerializer to handle attribute XmlSchemePrivider.IsAny.
...
XmlSerializer no longer outputs a root element with class name when the class has the attribute XmlSchemeProvider and IsAny is true.
Fixes #11916
2014-08-18 11:42:05 +01:00
Alexander Köplinger
48e112d652
[Cleanup] Removed TARGET_JVM
...
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Chris Webb
1a3ec8c3b3
Fixed issue related to fully qualified namespaces being used for XmlEnumAttribute values.
2014-08-07 06:15:55 +00:00
Alistair Bush
f3296a1559
When a read only property and the type is an interface we can't serialize the type.
...
This change is released under the MIT license.
2014-03-09 01:05:24 +13:00
Martin Baulig
51984e1631
Fix this again.
2014-02-28 17:27:16 +01:00
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