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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기