예제 #1
0
 private static XmlSchema GetXmlSchema<T>()
 {
     var schemas = new XmlSchemas();
     var xmlImporter = new XmlReflectionImporter();
     var xmlExporter = new XmlSchemaExporter(schemas);
     xmlExporter.ExportTypeMapping(xmlImporter.ImportTypeMapping(typeof(T)));
     return schemas.Single();
 }