XsdDataContractExporter.Export 方法

定義

將 Common Language Runtime (CLR) 類型或類型集合轉換成 XML 結構描述集合。

多載

Export(ICollection<Assembly>)

轉換包含在指定組件集合中的類型。

Export(ICollection<Type>)

轉換已傳遞到這個方法之 ICollection<T> 中所包含的類型。

Export(Type)

將指定的.NET Framework類型轉換成 XML 架構定義語言, (XSD) 架構。

備註

建議做法是使用其中一個 CanExport 多載來判定是否能夠匯出指定的型別或型別集合。

在呼叫 Export 方法後,從 Schemas 屬性擷取結構描述。

Export(ICollection<Assembly>)

來源:
XsdDataContractExporter.cs
來源:
XsdDataContractExporter.cs
來源:
XsdDataContractExporter.cs

轉換包含在指定組件集合中的類型。

public:
 void Export(System::Collections::Generic::ICollection<System::Reflection::Assembly ^> ^ assemblies);
public void Export (System.Collections.Generic.ICollection<System.Reflection.Assembly> assemblies);
member this.Export : System.Collections.Generic.ICollection<System.Reflection.Assembly> -> unit
Public Sub Export (assemblies As ICollection(Of Assembly))

參數

assemblies
ICollection<Assembly>

ICollection<T> (屬於 Assembly),其中包含要匯出的類型。

例外狀況

assemblies 引數為 null

在集合中的 Assemblynull

適用於

Export(ICollection<Type>)

來源:
XsdDataContractExporter.cs
來源:
XsdDataContractExporter.cs
來源:
XsdDataContractExporter.cs

轉換已傳遞到這個方法之 ICollection<T> 中所包含的類型。

public:
 void Export(System::Collections::Generic::ICollection<Type ^> ^ types);
public void Export (System.Collections.Generic.ICollection<Type> types);
member this.Export : System.Collections.Generic.ICollection<Type> -> unit
Public Sub Export (types As ICollection(Of Type))

參數

types
ICollection<Type>

ICollection<T> (屬於 Type),其中包含要匯出的類型。

例外狀況

types 引數為 null

在集合中的類型為 null

適用於

Export(Type)

來源:
XsdDataContractExporter.cs
來源:
XsdDataContractExporter.cs
來源:
XsdDataContractExporter.cs

將指定的.NET Framework類型轉換成 XML 架構定義語言, (XSD) 架構。

public:
 void Export(Type ^ type);
public void Export (Type type);
member this.Export : Type -> unit
Public Sub Export (type As Type)

參數

type
Type

要轉換成 XML 結構描述的 Type

例外狀況

type 引數為 null

備註

呼叫 CanExport,即可判定是否能夠匯出型別。 在呼叫 Export 方法後,即可透過 Schemas 屬性擷取結構描述。

適用於