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

Definition

Gets all the exports matching the specified conditions.

Overloads

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)

Parameters

definition
ImportDefinition ImportDefinition ImportDefinition ImportDefinition

The object that defines the conditions of the Export objects to get.

Returns

A collection of all the Export objects matching the condition specified by definition.

Exceptions

Cardinality is ExactlyOne and there are zero Export objects that match the conditions of the specified ImportDefinition.

-or-

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>

Parameters

definition
ImportDefinition ImportDefinition ImportDefinition ImportDefinition

The object that defines the conditions of the Export objects to get.

atomicComposition
AtomicComposition AtomicComposition AtomicComposition AtomicComposition

The transactional container for the composition.

Returns

A collection of all the Export objects matching the condition specified by definition and atomicComposition.

Exceptions

Cardinality is ExactlyOne and there are zero Export objects that match the conditions of the specified ImportDefinition.

-or-

Cardinality is ZeroOrOne or ExactlyOne and there is more than one Export object that matches the conditions of the specified ImportDefinition.

definition is null.

-or-

atomicComposition 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>>

Parameters

type
Type Type Type Type

The type parameter of the Lazy<T,TMetadata> objects to return.

metadataViewType
Type Type Type Type

The type of the metadata view of the Lazy<T,TMetadata> objects to return.

contractName
String String String String

The contract name of the Lazy<T,TMetadata> object to return, or null or an empty string ("") to use the default contract name.

Returns

A collection of all the Lazy<T,TMetadata> objects for the contract matching contractName.

Exceptions

Remarks

The default contract name is the result of calling the GetContractName method on type.

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))

Type Parameters

T

The type parameter of the Lazy<T,TMetadata> objects to return. The contract name is also derived from this type parameter.

TMetadataView

The type of the metadata view of the Lazy<T,TMetadata> objects to return.

Returns

IEnumerable<Lazy<T,TMetadataView>>

The Lazy<T,TMetadata> objects with the contract name derived from T, if found; otherwise, an empty IEnumerable<T> object.

Exceptions

Remarks

The contract name is the result of calling the GetContractName method on T.

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))

Type Parameters

T

The type parameter of the Lazy<T,TMetadata> objects to return. The contract name is also derived from this type parameter.

TMetadataView

The type of the metadata view of the Lazy<T,TMetadata> objects to return.

Parameters

contractName
String String String String

The contract name of the Lazy<T,TMetadata> objects to return, or null or an empty string ("") to use the default contract name.

Returns

IEnumerable<Lazy<T,TMetadataView>>

The Lazy<T,TMetadata> objects with the specified contract name if found; otherwise, an empty IEnumerable<T> object.

Exceptions

Remarks

The default contract name is the result of calling the GetContractName method on T.

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))

Type Parameters

T

The type parameter of the Lazy<T> objects to return. The contract name is also derived from this type parameter.

Returns

The Lazy<T> objects with the contract name derived from T, if found; otherwise, an empty IEnumerable<T> object.

Exceptions

Remarks

The contract name is the result of calling the GetContractName method on T.

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))

Type Parameters

T

The type parameter of the Lazy<T> objects to return.

Parameters

contractName
String String String String

The contract name of the Lazy<T> objects to return, or null or an empty string ("") to use the default contract name.

Returns

The Lazy<T> objects with the specified contract name, if found; otherwise, an empty IEnumerable<T> object.

Exceptions

Remarks

The default contract name is the result of calling the GetContractName method on T.

The contract name is compared by using the Ordinal property to perform a case-sensitive, non-linguistic comparison.

Applies to