CompositionContext.GetExports Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetExports(Type) |
Retrieves a collection of all exports that match the specified type. |
GetExports(Type, String) |
Retrieves all exports that match the specified contract name and type. |
GetExports<TExport>() |
Retrieves all exports that match the specified generic type parameter. |
GetExports<TExport>(String) |
Retrieves all exports that match the specified generic type parameter and contract name. |
GetExports(Type)
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
Retrieves a collection of all exports that match the specified type.
public:
System::Collections::Generic::IEnumerable<System::Object ^> ^ GetExports(Type ^ exportType);
public System.Collections.Generic.IEnumerable<object> GetExports (Type exportType);
member this.GetExports : Type -> seq<obj>
Public Function GetExports (exportType As Type) As IEnumerable(Of Object)
Parameters
- exportType
- Type
The type to match.
Returns
A collection of exported values.
Exceptions
No exports were found for exportType
.
Applies to
GetExports(Type, String)
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
Retrieves all exports that match the specified contract name and type.
public:
System::Collections::Generic::IEnumerable<System::Object ^> ^ GetExports(Type ^ exportType, System::String ^ contractName);
public System.Collections.Generic.IEnumerable<object> GetExports (Type exportType, string contractName);
member this.GetExports : Type * string -> seq<obj>
Public Function GetExports (exportType As Type, contractName As String) As IEnumerable(Of Object)
Parameters
- exportType
- Type
The type to match.
- contractName
- String
The name to match.
Returns
A collection of exported values.
Exceptions
No exports were found for exportType
.
Applies to
GetExports<TExport>()
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
Retrieves all exports that match the specified generic type parameter.
public:
generic <typename TExport>
System::Collections::Generic::IEnumerable<TExport> ^ GetExports();
public System.Collections.Generic.IEnumerable<TExport> GetExports<TExport> ();
member this.GetExports : unit -> seq<'Export>
Public Function GetExports(Of TExport) () As IEnumerable(Of TExport)
Type Parameters
- TExport
The type to match.
Returns
A collection of exported values.
Exceptions
No exports were found for TExport
.
Applies to
GetExports<TExport>(String)
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
- Source:
- CompositionContext.cs
Retrieves all exports that match the specified generic type parameter and contract name.
public:
generic <typename TExport>
System::Collections::Generic::IEnumerable<TExport> ^ GetExports(System::String ^ contractName);
public System.Collections.Generic.IEnumerable<TExport> GetExports<TExport> (string contractName);
member this.GetExports : string -> seq<'Export>
Public Function GetExports(Of TExport) (contractName As String) As IEnumerable(Of TExport)
Type Parameters
- TExport
The type to match.
Parameters
- contractName
- String
The name to match.
Returns
A collection of exported values.
Exceptions
No exports were found for TExport
and contractName
.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈