+2007-02-19 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlReflectionImporter.cs : CanBeNull() should return true when the
+ argument is generic nullable value type.
+
2007-02-19 Atsushi Enomoto <atsushi@ximian.com>
* TypeData.cs, MapCodeGenerator.cs, XmlMemberMapping.cs,
+2007-02-19 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlReflectionImporterTests.cs : added test for nullable int import.
+
2007-02-14 Atsushi Enomoto <atsushi@ximian.com>
* XmlSerializerTests.cs : added HasFieldSpecifiedButIrrelevant().
}
#if NET_2_0
+
+ [Test]
+ public void ImportNullableInt ()
+ {
+ XmlReflectionImporter imp = new XmlReflectionImporter ();
+ XmlTypeMapping map = imp.ImportTypeMapping (typeof (int?));
+ XmlSchemas schemas = new XmlSchemas ();
+ XmlSchemaExporter exp = new XmlSchemaExporter (schemas);
+ exp.ExportTypeMapping (map);
+ XmlSchema schema = schemas [0];
+ XmlSchemaElement el = schema.Items [0] as XmlSchemaElement;
+ Assert.AreEqual ("int", el.Name, "#1");
+ Assert.AreEqual (new XmlQualifiedName ("int", XmlSchema.Namespace), el.SchemaTypeName, "#2");
+ Assert.AreEqual (true, el.IsNillable, "#3");
+ }
+
[Test]
public void ImportNullableContainer ()
{