ExportProvider.GetExports ExportProvider.GetExports ExportProvider.GetExports ExportProvider.GetExports Method

定義

取得符合指定條件的所有匯出。Gets all the exports matching the specified conditions.

多載

GetExports(ImportDefinition) GetExports(ImportDefinition) GetExports(ImportDefinition) GetExports(ImportDefinition)

取得符合指定之匯入定義條件的所有匯出。Gets all exports that match the conditions of the specified import definition.

GetExports(ImportDefinition, AtomicComposition) GetExports(ImportDefinition, AtomicComposition) GetExports(ImportDefinition, AtomicComposition)

取得符合指定匯入定義和撰寫條件的所有匯出。Gets all exports that match the conditions of the specified import definition and composition.

GetExports(Type, Type, String) GetExports(Type, Type, String) GetExports(Type, Type, String)

取得具有指定之合約名稱的所有匯出結果。Gets all the exports with the specified contract name.

GetExports<T,TMetadataView>() GetExports<T,TMetadataView>() GetExports<T,TMetadataView>() GetExports<T,TMetadataView>()

取得具有從指定型別參數衍生之合約名稱的所有匯出。Gets all the exports with the contract name derived from the specified type parameter.

GetExports<T,TMetadataView>(String) GetExports<T,TMetadataView>(String) GetExports<T,TMetadataView>(String) GetExports<T,TMetadataView>(String)

取得具有指定之合約名稱的所有匯出結果。Gets all the exports with the specified contract name.

GetExports<T>() GetExports<T>() GetExports<T>() GetExports<T>()

取得具有從指定型別參數衍生之合約名稱的所有匯出。Gets all the exports with the contract name derived from the specified type parameter.

GetExports<T>(String) GetExports<T>(String) GetExports<T>(String) GetExports<T>(String)

取得具有指定之合約名稱的所有匯出結果。Gets all the exports with the specified contract name.

GetExports(ImportDefinition) GetExports(ImportDefinition) GetExports(ImportDefinition) GetExports(ImportDefinition)

取得符合指定之匯入定義條件的所有匯出。Gets all exports that match the conditions of the specified import definition.

public:
 System::Collections::Generic::IEnumerable<System::ComponentModel::Composition::Primitives::Export ^> ^ GetExports(System::ComponentModel::Composition::Primitives::ImportDefinition ^ definition);
public System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.Primitives.Export> GetExports (System.ComponentModel.Composition.Primitives.ImportDefinition definition);
member this.GetExports : System.ComponentModel.Composition.Primitives.ImportDefinition -> seq<System.ComponentModel.Composition.Primitives.Export>
Public Function GetExports (definition As ImportDefinition) As IEnumerable(Of Export)

參數

definition
ImportDefinition ImportDefinition ImportDefinition ImportDefinition

物件,此物件會定義要取得之 Export 物件的條件。The object that defines the conditions of the Export objects to get.

傳回

一個集合,包含符合 definition 指定條件的所有 Export 物件。A collection of all the Export objects matching the condition specified by definition.

例外狀況

CardinalityExactlyOne,而且沒有任何 Export 物件符合指定之 ImportDefinition 的條件。Cardinality is ExactlyOne and there are zero Export objects that match the conditions of the specified ImportDefinition.

-或--or- CardinalityZeroOrOneExactlyOne,而且有一個以上的 Export 物件符合指定之 ImportDefinition 的條件。Cardinality is ZeroOrOne or ExactlyOne and there is more than one Export object that matches the conditions of the specified ImportDefinition.

GetExports(ImportDefinition, AtomicComposition) GetExports(ImportDefinition, AtomicComposition) GetExports(ImportDefinition, AtomicComposition)

取得符合指定匯入定義和撰寫條件的所有匯出。Gets all exports that match the conditions of the specified import definition and composition.

public:
 System::Collections::Generic::IEnumerable<System::ComponentModel::Composition::Primitives::Export ^> ^ GetExports(System::ComponentModel::Composition::Primitives::ImportDefinition ^ definition, System::ComponentModel::Composition::Hosting::AtomicComposition ^ atomicComposition);
public System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.Primitives.Export> GetExports (System.ComponentModel.Composition.Primitives.ImportDefinition definition, System.ComponentModel.Composition.Hosting.AtomicComposition atomicComposition);
member this.GetExports : System.ComponentModel.Composition.Primitives.ImportDefinition * System.ComponentModel.Composition.Hosting.AtomicComposition -> seq<System.ComponentModel.Composition.Primitives.Export>

參數

definition
ImportDefinition ImportDefinition ImportDefinition ImportDefinition

物件,此物件會定義要取得之 Export 物件的條件。The object that defines the conditions of the Export objects to get.

atomicComposition
AtomicComposition AtomicComposition AtomicComposition AtomicComposition

用於撰寫的異動容器。The transactional container for the composition.

傳回

一個集合,包含符合 definitionatomicComposition 指定條件的所有 Export 物件。A collection of all the Export objects matching the condition specified by definition and atomicComposition.

例外狀況

CardinalityExactlyOne,而且沒有任何 Export 物件符合指定之 ImportDefinition 的條件。Cardinality is ExactlyOne and there are zero Export objects that match the conditions of the specified ImportDefinition.

-或--or- CardinalityZeroOrOneExactlyOne,而且有一個以上的 Export 物件符合指定之 ImportDefinition 的條件。Cardinality is ZeroOrOne or ExactlyOne and there is more than one Export object that matches the conditions of the specified ImportDefinition.

definitionnulldefinition is null.

-或--or- atomicCompositionnullatomicComposition is null.

GetExports(Type, Type, String) GetExports(Type, Type, String) GetExports(Type, Type, String)

取得具有指定之合約名稱的所有匯出結果。Gets all the exports with the specified contract name.

public:
 System::Collections::Generic::IEnumerable<Lazy<System::Object ^, System::Object ^> ^> ^ GetExports(Type ^ type, Type ^ metadataViewType, System::String ^ contractName);
public System.Collections.Generic.IEnumerable<Lazy<object,object>> GetExports (Type type, Type metadataViewType, string contractName);
member this.GetExports : Type * Type * string -> seq<Lazy<obj, obj>>

參數

type
Type Type Type Type

要傳回之 Lazy<T,TMetadata> 物件的型別參數。The type parameter of the Lazy<T,TMetadata> objects to return.

metadataViewType
Type Type Type Type

要傳回的 Lazy<T,TMetadata> 物件中繼資料檢視的型別。The type of the metadata view of the Lazy<T,TMetadata> objects to return.

contractName
String String String String

要傳回的 Lazy<T,TMetadata> 物件的合約名稱,或者是 null,或者是要使用預設合約名稱的空字串 ("")。The contract name of the Lazy<T,TMetadata> object to return, or null or an empty string ("") to use the default contract name.

傳回

一個集合,包含符合 contractName 之合約的所有 Lazy<T,TMetadata> 物件。A collection of all the Lazy<T,TMetadata> objects for the contract matching contractName.

例外狀況

metadataViewType 不是有效的中繼資料檢視型別。metadataViewType is not a valid metadata view type.

備註

預設的合約名稱是在上GetContractName type呼叫方法的結果。The default contract name is the result of calling the GetContractName method on type.

合約名稱的比較方式是使用Ordinal屬性來執行區分大小寫的非語言比較。The contract name is compared by using the Ordinal property to perform a case-sensitive, non-linguistic comparison.

GetExports<T,TMetadataView>() GetExports<T,TMetadataView>() GetExports<T,TMetadataView>() GetExports<T,TMetadataView>()

取得具有從指定型別參數衍生之合約名稱的所有匯出。Gets all the exports with the contract name derived from the specified type parameter.

public:
generic <typename T, typename TMetadataView>
 System::Collections::Generic::IEnumerable<Lazy<T, TMetadataView> ^> ^ GetExports();
public System.Collections.Generic.IEnumerable<Lazy<T,TMetadataView>> GetExports<T,TMetadataView> ();
member this.GetExports : unit -> seq<Lazy<'T, 'MetadataView>>
Public Function GetExports(Of T, TMetadataView) () As IEnumerable(Of Lazy(Of T, TMetadataView))

類型參數

T

要傳回之 Lazy<T,TMetadata> 物件的型別參數。The type parameter of the Lazy<T,TMetadata> objects to return. 合約名稱也是從這個型別參數衍生。The contract name is also derived from this type parameter.

TMetadataView

要傳回的 Lazy<T,TMetadata> 物件中繼資料檢視的型別。The type of the metadata view of the Lazy<T,TMetadata> objects to return.

傳回

IEnumerable<Lazy<T,TMetadataView>>

則為具有從 T 衍生之合約名稱的 Lazy<T,TMetadata> 物件 (如果找到的話),否則,為空白 IEnumerable<T> 物件。The Lazy<T,TMetadata> objects with the contract name derived from T, if found; otherwise, an empty IEnumerable<T> object.

例外狀況

TMetadataView 不是有效的中繼資料檢視型別。TMetadataView is not a valid metadata view type.

備註

合約名稱是在上GetContractName T呼叫方法的結果。The contract name is the result of calling the GetContractName method on T.

合約名稱的比較方式是使用Ordinal屬性來執行區分大小寫的非語言比較。The contract name is compared by using the Ordinal property to perform a case-sensitive, non-linguistic comparison.

GetExports<T,TMetadataView>(String) GetExports<T,TMetadataView>(String) GetExports<T,TMetadataView>(String) GetExports<T,TMetadataView>(String)

取得具有指定之合約名稱的所有匯出結果。Gets all the exports with the specified contract name.

public:
generic <typename T, typename TMetadataView>
 System::Collections::Generic::IEnumerable<Lazy<T, TMetadataView> ^> ^ GetExports(System::String ^ contractName);
public System.Collections.Generic.IEnumerable<Lazy<T,TMetadataView>> GetExports<T,TMetadataView> (string contractName);
member this.GetExports : string -> seq<Lazy<'T, 'MetadataView>>
Public Function GetExports(Of T, TMetadataView) (contractName As String) As IEnumerable(Of Lazy(Of T, TMetadataView))

類型參數

T

要傳回之 Lazy<T,TMetadata> 物件的型別參數。The type parameter of the Lazy<T,TMetadata> objects to return. 合約名稱也是從這個型別參數衍生。The contract name is also derived from this type parameter.

TMetadataView

要傳回的 Lazy<T,TMetadata> 物件中繼資料檢視的型別。The type of the metadata view of the Lazy<T,TMetadata> objects to return.

參數

contractName
String String String String

要傳回的 Lazy<T,TMetadata> 物件的合約名稱,或者是 null,或者是要使用預設合約名稱的空字串 ("")。The contract name of the Lazy<T,TMetadata> objects to return, or null or an empty string ("") to use the default contract name.

傳回

IEnumerable<Lazy<T,TMetadataView>>

具有指定合約名稱的 Lazy<T,TMetadata> 物件 (如果找到的話),否則,為空白 IEnumerable<T> 物件。The Lazy<T,TMetadata> objects with the specified contract name if found; otherwise, an empty IEnumerable<T> object.

例外狀況

TMetadataView 不是有效的中繼資料檢視型別。TMetadataView is not a valid metadata view type.

備註

預設的合約名稱是在上GetContractName T呼叫方法的結果。The default contract name is the result of calling the GetContractName method on T.

合約名稱的比較方式是使用Ordinal屬性來執行區分大小寫的非語言比較。The contract name is compared by using the Ordinal property to perform a case-sensitive, non-linguistic comparison.

GetExports<T>() GetExports<T>() GetExports<T>() GetExports<T>()

取得具有從指定型別參數衍生之合約名稱的所有匯出。Gets all the exports with the contract name derived from the specified type parameter.

public:
generic <typename T>
 System::Collections::Generic::IEnumerable<Lazy<T> ^> ^ GetExports();
public System.Collections.Generic.IEnumerable<Lazy<T>> GetExports<T> ();
member this.GetExports : unit -> seq<Lazy<'T>>
Public Function GetExports(Of T) () As IEnumerable(Of Lazy(Of T))

類型參數

T

要傳回之 Lazy<T> 物件的型別參數。The type parameter of the Lazy<T> objects to return. 合約名稱也是從這個型別參數衍生。The contract name is also derived from this type parameter.

傳回

則為具有從 T 衍生之合約名稱的 Lazy<T> 物件 (如果找到的話),否則,為空白 IEnumerable<T> 物件。The Lazy<T> objects with the contract name derived from T, if found; otherwise, an empty IEnumerable<T> object.

例外狀況

備註

合約名稱是在上GetContractName T呼叫方法的結果。The contract name is the result of calling the GetContractName method on T.

合約名稱的比較方式是使用Ordinal屬性來執行區分大小寫的非語言比較。The contract name is compared by using the Ordinal property to perform a case-sensitive, non-linguistic comparison.

GetExports<T>(String) GetExports<T>(String) GetExports<T>(String) GetExports<T>(String)

取得具有指定之合約名稱的所有匯出結果。Gets all the exports with the specified contract name.

public:
generic <typename T>
 System::Collections::Generic::IEnumerable<Lazy<T> ^> ^ GetExports(System::String ^ contractName);
public System.Collections.Generic.IEnumerable<Lazy<T>> GetExports<T> (string contractName);
member this.GetExports : string -> seq<Lazy<'T>>
Public Function GetExports(Of T) (contractName As String) As IEnumerable(Of Lazy(Of T))

類型參數

T

要傳回之 Lazy<T> 物件的型別參數。The type parameter of the Lazy<T> objects to return.

參數

contractName
String String String String

要傳回的 Lazy<T> 物件的合約名稱,或者是 null,或者是要使用預設合約名稱的空字串 ("")。The contract name of the Lazy<T> objects to return, or null or an empty string ("") to use the default contract name.

傳回

則為具有指定合約名稱的 Lazy<T> 物件 (如果找到的話),否則,為空白 IEnumerable<T> 物件。The Lazy<T> objects with the specified contract name, if found; otherwise, an empty IEnumerable<T> object.

例外狀況

備註

預設的合約名稱是在上GetContractName T呼叫方法的結果。The default contract name is the result of calling the GetContractName method on T.

合約名稱的比較方式是使用Ordinal屬性來執行區分大小寫的非語言比較。The contract name is compared by using the Ordinal property to perform a case-sensitive, non-linguistic comparison.

適用於