Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

XmlCodeExporter Class

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Generates types and attribute declarations from internal type mapping information for XML schema element declarations.

System.Object
  System.Xml.Serialization.CodeExporter
    System.Xml.Serialization.XmlCodeExporter

Namespace:  System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)
public class XmlCodeExporter : CodeExporter

The XmlCodeExporter type exposes the following members.

  NameDescription
Public methodXmlCodeExporter(CodeNamespace)Initializes a new instance of the XmlCodeExporter class using the specified namespace.
Public methodXmlCodeExporter(CodeNamespace, CodeCompileUnit)Initializes a new instance of the XmlCodeExporter class using the specified namespace and code compile unit.
Public methodXmlCodeExporter(CodeNamespace, CodeCompileUnit, CodeGenerationOptions)Initializes a new instance of the XmlCodeExporter class using the specified namespace, code compile unit, and code generation options.
Public methodXmlCodeExporter(CodeNamespace, CodeCompileUnit, CodeGenerationOptions, Hashtable)Initializes a new instance of the XmlCodeExporter class using the specified .NET Framework namespace, code compile unit containing the graph of the objects, an object representing code generation options, and a collection of mapping objects.
Public methodXmlCodeExporter(CodeNamespace, CodeCompileUnit, CodeDomProvider, CodeGenerationOptions, Hashtable)Initializes a new instance of the XmlCodeExporter class using the specified .NET Framework namespace, code compile unit containing the graph of the objects, an enumeration specifying code options, and a collection of mapping objects.
Top
  NameDescription
Public propertyIncludeMetadataGets a collection of code attribute metadata that is included when the code is exported. (Inherited from CodeExporter.)
Top
  NameDescription
Public methodAddMappingMetadata(CodeAttributeDeclarationCollection, XmlMemberMapping, String)Adds an XmlElementAttribute declaration to a method parameter or return value that corresponds to a <part> element of a SOAP message definition in a Web Services Description Language (WSDL) document.
Public methodAddMappingMetadata(CodeAttributeDeclarationCollection, XmlTypeMapping, String)Adds an XmlElementAttribute declaration to a method return value that corresponds to a <part> element of a non-SOAP message definition in a Web Services Description Language (WSDL) document.
Public methodAddMappingMetadata(CodeAttributeDeclarationCollection, XmlMemberMapping, String, Boolean)Adds an XmlElementAttribute declaration to a method parameter or return value that corresponds to a <part> element of a SOAP message definition in a Web Services Description Language (WSDL) document.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExportMembersMappingGenerates a .NET Framework type, plus attribute declarations, for each of the parts that belong to a SOAP message definition in a Web Services Description Language (WSDL) document.
Public methodExportTypeMappingGenerates a .NET Framework type, plus attribute declarations, for an XML schema element.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The XmlCodeExporter class generates .NET Framework types or attribute declarations from internal mappings to .NET Framework types. These internal mappings are generated by the XmlSchemaImporter class for elements defined in an XSD document or as parts in a Web Services Description Language (WSDL) document. XmlCodeExporter is not used directly; it is used with the Web Services Description Language tool (Wsdl.exe) or the XML Schema Definition tool (Xsd.exe).

Wsdl.exe uses the types or attribute declarations that are generated by XmlCodeExporter and the internal mappings generated by the XmlSchemaImporter class to generate client proxy classes or abstract server classes from a WSDL document. Wsdl.exe uses XmlCodeExporter and the ServiceDescriptionImporter class when a WSDL document specifies:

  • Literal use, indicating that the contents of SOAP message parameters and return values (or request and response documents) are literally specified with XML schema definitions.

  • Non-SOAP implementations of Web services using the HTTP-GET and HTTP-POST operations.

  • Xsd.exe uses XmlCodeExporter to generate classes from XML Schema Definition (XSD) documents.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.