Imported Upstream version 3.12.0

Former-commit-id: cf92446697332992ec36726e78eb8703e1f259d7
This commit is contained in:
Jo Shields
2015-01-13 10:44:36 +00:00
parent 8b9b85e7f5
commit 181b81b4a4
659 changed files with 12743 additions and 16300 deletions

View File

@ -1117,5 +1117,83 @@ namespace MonoTests.System.Xml.TestClasses
[XmlElement ("Extra", Order=1)]
public string[] Extra;
}
public class SimpleObjectA
{
[XmlAttribute]
public string Text
{
get; set;
}
public static implicit operator SimpleObjectA (SimpleObjectB o)
{
return new SimpleObjectA { Text = o.Text };
}
public static implicit operator SimpleObjectB (SimpleObjectA o)
{
return new SimpleObjectB { Text = o.Text };
}
}
public class SimpleObjectB
{
[XmlAttribute]
public string Text
{
get; set;
}
}
public class ObjectWithElementRequiringImplicitCast
{
public ObjectWithElementRequiringImplicitCast () { }
public ObjectWithElementRequiringImplicitCast (string text)
{
Object = new SimpleObjectB { Text = text };
}
[XmlElement(Type = typeof (SimpleObjectA))]
public SimpleObjectB Object
{
get; set;
}
}
public class ObjectWithNullableArrayItems
{
[XmlArrayItem ("Element", IsNullable = true)]
public List<SimpleClass> Elements;
}
public class ObjectWithNonNullableArrayItems
{
[XmlArrayItem ("Element", IsNullable = false)]
public List<SimpleClass> Elements;
}
public class ObjectWithNotSpecifiedNullableArrayItems
{
[XmlArrayItem ("Element")]
public List<SimpleClass> Elements;
}
[Serializable]
public sealed class ClassWithDefaultTextNotNull
{
[XmlText]
public string Value;
public const string DefaultValue = "NotNull";
public ClassWithDefaultTextNotNull (string v) {
Value = v;
}
public ClassWithDefaultTextNotNull () {
Value = DefaultValue;
}
}
}

View File

@ -1 +1 @@
6001f7f247689571d9181a9a36a4e1a33efbdf6a
ef6ba78867fa3b99cb16bbe347f37608795cc92a