ExportAttribute 建構函式

定義

初始化 ExportAttribute 類別的新執行個體。

多載

ExportAttribute()

使用預設合約名稱來匯出標記有這個屬性的型別或成員,初始化 ExportAttribute 類別的新執行個體。

ExportAttribute(String)

使用指定合約名稱來匯出標記有這個屬性的型別或成員,初始化 ExportAttribute 類別的新執行個體。

ExportAttribute(Type)

使用衍生自指定型別之合約名稱來匯出標記有這個屬性的型別或成員,初始化 ExportAttribute 類別的新執行個體。

ExportAttribute(String, Type)

使用指定的合約名稱來匯出指定的型別,初始化 ExportAttribute 類別的新執行個體。

ExportAttribute()

來源:
ExportAttribute.cs
來源:
ExportAttribute.cs
來源:
ExportAttribute.cs

使用預設合約名稱來匯出標記有這個屬性的型別或成員,初始化 ExportAttribute 類別的新執行個體。

public:
 ExportAttribute();
public ExportAttribute ();
Public Sub New ()

備註

默認合約名稱是在屬性或字段類型上呼叫 GetContractName 方法的結果,或是以此屬性標記的類型。

以此屬性標示的方法必須使用 或 ExportAttribute(Type)來指定合約名稱或型ExportAttribute(String)別。

合約名稱的比較方式是 Ordinal 使用 屬性來執行區分大小寫的非語言比較。

適用於

ExportAttribute(String)

來源:
ExportAttribute.cs
來源:
ExportAttribute.cs
來源:
ExportAttribute.cs

使用指定合約名稱來匯出標記有這個屬性的型別或成員,初始化 ExportAttribute 類別的新執行個體。

public:
 ExportAttribute(System::String ^ contractName);
public ExportAttribute (string contractName);
public ExportAttribute (string? contractName);
new System.ComponentModel.Composition.ExportAttribute : string -> System.ComponentModel.Composition.ExportAttribute
Public Sub New (contractName As String)

參數

contractName
String

用來匯出標記有這個屬性之型別或成員的合約名稱,否則為使用預設合約名稱的 null 或空字串 ("")。

備註

默認合約名稱是在屬性或字段類型上呼叫 GetContractName 方法的結果,或呼叫這個以此屬性標示的類型。

以此屬性標示的方法必須使用 或 ExportAttribute(Type)來指定合約名稱或型ExportAttribute(String)別。

合約名稱的比較方式是 Ordinal 使用 屬性來執行區分大小寫的非語言比較。

適用於

ExportAttribute(Type)

來源:
ExportAttribute.cs
來源:
ExportAttribute.cs
來源:
ExportAttribute.cs

使用衍生自指定型別之合約名稱來匯出標記有這個屬性的型別或成員,初始化 ExportAttribute 類別的新執行個體。

public:
 ExportAttribute(Type ^ contractType);
public ExportAttribute (Type contractType);
public ExportAttribute (Type? contractType);
new System.ComponentModel.Composition.ExportAttribute : Type -> System.ComponentModel.Composition.ExportAttribute
Public Sub New (contractType As Type)

參數

contractType
Type

從其中衍生合約名稱的型別,而該合約名稱會用來匯出標記有這個屬性的型別或成員,否則為使用預設合約名稱的 null

備註

合約名稱是在上contractType呼叫 GetContractName 方法的結果。

默認合約名稱是在屬性或字段類型上呼叫 GetContractName 方法的結果,或是以此屬性標記的類型。

以此屬性標示的方法必須使用 或 ExportAttribute(Type)來指定合約名稱或型ExportAttribute(String)別。

合約名稱的比較方式是 Ordinal 使用 屬性來執行區分大小寫的非語言比較。

適用於

ExportAttribute(String, Type)

來源:
ExportAttribute.cs
來源:
ExportAttribute.cs
來源:
ExportAttribute.cs

使用指定的合約名稱來匯出指定的型別,初始化 ExportAttribute 類別的新執行個體。

public:
 ExportAttribute(System::String ^ contractName, Type ^ contractType);
public ExportAttribute (string contractName, Type contractType);
public ExportAttribute (string? contractName, Type? contractType);
new System.ComponentModel.Composition.ExportAttribute : string * Type -> System.ComponentModel.Composition.ExportAttribute
Public Sub New (contractName As String, contractType As Type)

參數

contractName
String

用來匯出標記有這個屬性之型別或成員的合約名稱,否則為使用預設合約名稱的 null 或空字串 ("")。

contractType
Type

要匯出的型別。

備註

默認合約名稱是在屬性或字段類型上呼叫 AttributedModelServices.GetContractName(Type) 的結果,或呼叫這個屬性標示的類型本身。

合約名稱是使用區分大小寫的非語言比較來 StringComparer.Ordinal比較。

適用於