CompositionContext.GetExports 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| GetExports(Type) |
擷取所有符合指定類型的匯出資料集合。 |
| GetExports(Type, String) |
擷取所有符合指定合約名稱與類型的匯出。 |
| GetExports<TExport>() |
擷取所有符合指定通用型態參數的匯出。 |
| GetExports<TExport>(String) |
擷取所有符合指定通用型態參數與合約名稱的匯出。 |
GetExports(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)
參數
- exportType
- Type
那種能匹配的類型。
傳回
一組匯出價值。
例外狀況
未找到任何匯出。exportType
適用於
GetExports(Type, String)
擷取所有符合指定合約名稱與類型的匯出。
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)
參數
- exportType
- Type
那種能匹配的類型。
- contractName
- String
名字也很相符。
傳回
一組匯出價值。
例外狀況
未找到任何匯出。exportType
適用於
GetExports<TExport>()
擷取所有符合指定通用型態參數的匯出。
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)
類型參數
- TExport
那種能匹配的類型。
傳回
IEnumerable<TExport>
一組匯出價值。
例外狀況
未找到任何匯出。TExport
適用於
GetExports<TExport>(String)
擷取所有符合指定通用型態參數與合約名稱的匯出。
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)
類型參數
- TExport
那種能匹配的類型。
參數
- contractName
- String
名字也很相符。
傳回
IEnumerable<TExport>
一組匯出價值。
例外狀況
未發現 TExport 和 contractName的匯出。