System.Runtime.Serialization.XsdDataContractExporter.GetRootElementName C# (CSharp) Method

GetRootElementName() public method

public GetRootElementName ( System type ) : System.Xml.XmlQualifiedName
type System
return System.Xml.XmlQualifiedName
        public System.Xml.XmlQualifiedName GetRootElementName(System.Type type) { throw null; }
        public System.Xml.Schema.XmlSchemaType GetSchemaType(System.Type type) { throw null; }

Same methods

XsdDataContractExporter::GetRootElementName ( Type type ) : XmlQualifiedName

Usage Example

コード例 #1
0
        public void ExportXSDUsingDataContractExporter()
        {
            //create schema
              XsdDataContractExporter _exporter = new XsdDataContractExporter();
              Type _ConfigurationDataType = typeof(ConfigurationData);
              Assert.IsTrue(_exporter.CanExport(_ConfigurationDataType));

              _exporter.Export(_ConfigurationDataType);
              Console.WriteLine("number of schemas: {0}", _exporter.Schemas.Count);
              Console.WriteLine();

              //write out the schema
              XmlSchemaSet _Schemas = _exporter.Schemas;
              XmlQualifiedName XmlNameValue = _exporter.GetRootElementName(_ConfigurationDataType);
              string EmployeeNameSpace = XmlNameValue.Namespace;
              foreach (XmlSchema _schema in _Schemas.Schemas(EmployeeNameSpace))
            _schema.Write(Console.Out);
        }
All Usage Examples Of System.Runtime.Serialization.XsdDataContractExporter::GetRootElementName