XmlCodeExporter 類別

定義

從 XML 結構描述項目宣告的內部型別對應資訊,產生型別和屬性 (Attribute) 宣告。Generates types and attribute declarations from internal type mapping information for XML schema element declarations.

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public ref class XmlCodeExporter
public ref class XmlCodeExporter : System::Xml::Serialization::CodeExporter
public class XmlCodeExporter
public class XmlCodeExporter : System.Xml.Serialization.CodeExporter
type XmlCodeExporter = class
type XmlCodeExporter = class
    inherit CodeExporter
Public Class XmlCodeExporter
Public Class XmlCodeExporter
Inherits CodeExporter
繼承
XmlCodeExporter
繼承
XmlCodeExporter

備註

XmlCodeExporter 類別會產生從內部對應到 .NET Framework 類型的 .NET Framework 類型或屬性宣告。The XmlCodeExporter class generates .NET Framework types or attribute declarations from internal mappings to .NET Framework types. 這些內部對應是由 XSD 檔中所定義之專案的 XmlSchemaImporter 類別,或做為 Web 服務描述語言(WSDL)檔中的元件所產生。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;它會與 Web 服務描述語言工具(Wsdl.exe)或 XML 架構定義工具(Xsd.exe)搭配使用。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 會使用 XmlCodeExporter 所產生的類型或屬性宣告,以及由 XmlSchemaImporter 類別所產生的內部對應,從 WSDL 檔案產生用戶端 proxy 類別或抽象伺服器類別。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 檔案指定時,wsdl.exe 會使用 XmlCodeExporterServiceDescriptionImporter 類別:Wsdl.exe uses XmlCodeExporter and the ServiceDescriptionImporter class when a WSDL document specifies:

  • 常值使用,表示 SOAP 訊息參數和傳回值(或要求和回應檔)的內容實際上是以 XML 架構定義來指定。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.

  • 使用 HTTP GET 和 HTTP POST 作業的 Web 服務非 SOAP 的執行。Non-SOAP implementations of Web services using the HTTP-GET and HTTP-POST operations.

  • Xsd.exe 會使用 XmlCodeExporter,從 XML 架構定義(XSD)檔產生類別。Xsd.exe uses XmlCodeExporter to generate classes from XML Schema Definition (XSD) documents.

建構函式

XmlCodeExporter(CodeNamespace)

使用指定的命名空間,初始化 XmlCodeExporter 類別的新執行個體。Initializes a new instance of the XmlCodeExporter class using the specified namespace.

XmlCodeExporter(CodeNamespace, CodeCompileUnit)

使用指定的命名空間和程式碼編譯單位,初始化 XmlCodeExporter 類別的新執行個體。Initializes a new instance of the XmlCodeExporter class using the specified namespace and code compile unit.

XmlCodeExporter(CodeNamespace, CodeCompileUnit, CodeDomProvider, CodeGenerationOptions, Hashtable)

使用指定的 .NET Framework 命名空間、含有物件圖形的程式碼編譯單位、指定程式碼選項的列舉型別以及對應物件的集合,初始化 XmlCodeExporter 類別的新執行個體。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.

XmlCodeExporter(CodeNamespace, CodeCompileUnit, CodeGenerationOptions)

使用指定的命名空間、程式碼編譯單位和程式碼產生選項,初始化 XmlCodeExporter 類別的新執行個體。Initializes a new instance of the XmlCodeExporter class using the specified namespace, code compile unit, and code generation options.

XmlCodeExporter(CodeNamespace, CodeCompileUnit, CodeGenerationOptions, Hashtable)

使用指定的 .NET Framework 命名空間、含有物件圖形的程式碼編譯單位、表示程式碼產生選項的物件以及對應物件的集合,初始化 XmlCodeExporter 類別的新執行個體。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.

屬性

IncludeMetadata

這個 API 支援 .NET Framework 基礎結構,但您不可以直接在程式碼中使用它。This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

方法

AddMappingMetadata(CodeAttributeDeclarationCollection, XmlMemberMapping, String)

加入 XmlElementAttribute 宣告至方法參數,或傳回對應於 Web 服務描述語言 (WSDL) 文件中 SOAP 訊息定義之 <part> 項目的值。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.

AddMappingMetadata(CodeAttributeDeclarationCollection, XmlMemberMapping, String, Boolean)

加入 XmlElementAttribute 宣告至方法參數,或傳回對應於 Web 服務描述語言 (WSDL) 文件中 SOAP 訊息定義之 <part> 項目的值。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.

AddMappingMetadata(CodeAttributeDeclarationCollection, XmlTypeMapping, String)

加入 XmlElementAttribute 宣告至方法傳回值,以便對應於 Web 服務描述語言 (WSDL) 文件中非 SOAP 訊息定義的 <part> 項目。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.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
ExportMembersMapping(XmlMembersMapping)

針對屬於 Web 服務描述語言 (WSDL) 文件中 SOAP 訊息定義的各部分,產生 .NET Framework 型別,再加上屬性宣告。Generates 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.

ExportTypeMapping(XmlTypeMapping)

針對 XML 結構描述項目,產生 .NET Framework 型別,再加上屬性宣告。Generates a .NET Framework type, plus attribute declarations, for an XML schema element.

GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於

另請參閱