CatalogExportProvider CatalogExportProvider CatalogExportProvider CatalogExportProvider Class

定義

從目錄擷取匯出。Retrieves exports from a catalog.

public ref class CatalogExportProvider : System::ComponentModel::Composition::Hosting::ExportProvider, IDisposable
public class CatalogExportProvider : System.ComponentModel.Composition.Hosting.ExportProvider, IDisposable
type CatalogExportProvider = class
    inherit ExportProvider
    interface IDisposable
Public Class CatalogExportProvider
Inherits ExportProvider
Implements IDisposable
繼承
CatalogExportProviderCatalogExportProviderCatalogExportProviderCatalogExportProvider
實作

備註

重要

此類型會實作IDisposable介面。This type implements the IDisposable interface. 當您完成使用型別時,您應該處置它直接或間接。When you have finished using the type, you should dispose of it either directly or indirectly. 若要直接處置型別,呼叫其Dispose方法中的try / catch區塊。To dispose of the type directly, call its Dispose method in a try/catch block. 若要處置它間接,使用的語言建構這類using(在 C# 中) 或Using(在 Visual Basic)。To dispose of it indirectly, use a language construct such as using (in C#) or Using (in Visual Basic). 如需詳細資訊,請參閱 「 使用物件,實作 IDisposable 」 一節IDisposable介面 > 主題。For more information, see the "Using an Object that Implements IDisposable" section in the IDisposable interface topic.

建構函式

CatalogExportProvider(ComposablePartCatalog) CatalogExportProvider(ComposablePartCatalog) CatalogExportProvider(ComposablePartCatalog) CatalogExportProvider(ComposablePartCatalog)

使用指定的目錄初始化 CatalogExportProvider 類別的新執行個體。Initializes a new instance of the CatalogExportProvider class with the specified catalog.

CatalogExportProvider(ComposablePartCatalog, Boolean) CatalogExportProvider(ComposablePartCatalog, Boolean) CatalogExportProvider(ComposablePartCatalog, Boolean) CatalogExportProvider(ComposablePartCatalog, Boolean)

使用指定的目錄和選擇性安全執行緒模式,初始化 CatalogExportProvider 類別的新執行個體。Initializes a new instance of the CatalogExportProvider class with the specified catalog and optional thread-safe mode.

CatalogExportProvider(ComposablePartCatalog, CompositionOptions) CatalogExportProvider(ComposablePartCatalog, CompositionOptions) CatalogExportProvider(ComposablePartCatalog, CompositionOptions) CatalogExportProvider(ComposablePartCatalog, CompositionOptions)

使用指定的目錄和組合選項,初始化 CatalogExportProvider 類別的新執行個體。Initializes a new instance of the CatalogExportProvider class with the specified catalog and composition options.

屬性

Catalog Catalog Catalog Catalog

取得用來提供匯出的目錄。Gets the catalog that is used to provide exports.

SourceProvider SourceProvider SourceProvider SourceProvider

取得或設定匯出提供者,其可提供對額外匯出的存取。Gets or sets the export provider that provides access to additional exports.

方法

Dispose() Dispose() Dispose() Dispose()

釋放 CatalogExportProvider 類別目前的執行個體所使用的全部資源。Releases all resources used by the current instance of the CatalogExportProvider class.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

釋放 CatalogExportProvider 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the CatalogExportProvider and optionally releases the managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetExport<T,TMetadataView>() GetExport<T,TMetadataView>() GetExport<T,TMetadataView>() GetExport<T,TMetadataView>()

傳回具有從指定型別參數中衍生之合約名稱的匯出。Returns the export with the contract name derived from the specified type parameter. 如果沒有任何項目完全符合匯出結果,則擲回例外狀況。If there is not exactly one matching export, an exception is thrown.

(Inherited from ExportProvider)
GetExport<T,TMetadataView>(String) GetExport<T,TMetadataView>(String) GetExport<T,TMetadataView>(String) GetExport<T,TMetadataView>(String)

傳回具有指定合約名稱的匯出。Returns the export with the specified contract name. 如果沒有任何項目完全符合匯出結果,則擲回例外狀況。If there is not exactly one matching export, an exception is thrown.

(Inherited from ExportProvider)
GetExport<T>() GetExport<T>() GetExport<T>() GetExport<T>()

傳回具有從指定型別參數中衍生之合約名稱的匯出。Returns the export with the contract name derived from the specified type parameter. 如果沒有任何項目完全符合匯出結果,則擲回例外狀況。If there is not exactly one matching export, an exception is thrown.

(Inherited from ExportProvider)
GetExport<T>(String) GetExport<T>(String) GetExport<T>(String) GetExport<T>(String)

傳回具有指定合約名稱的匯出。Returns the export with the specified contract name. 如果沒有任何項目完全符合匯出結果,則擲回例外狀況。If there is not exactly one matching export, an exception is thrown.

(Inherited from ExportProvider)
GetExportedValue<T>() GetExportedValue<T>() GetExportedValue<T>() GetExportedValue<T>()

傳回具有從指定型別參數中衍生之合約名稱的匯出物件。Returns the exported object with the contract name derived from the specified type parameter. 如果沒有一個完全相符的匯出物件,則會擲回例外狀況。If there is not exactly one matching exported object, an exception is thrown.

(Inherited from ExportProvider)
GetExportedValue<T>(String) GetExportedValue<T>(String) GetExportedValue<T>(String) GetExportedValue<T>(String)

傳回具有指定合約名稱的匯出物件。Returns the exported object with the specified contract name. 如果沒有一個完全相符的匯出物件,則會擲回例外狀況。If there is not exactly one matching exported object, an exception is thrown.

(Inherited from ExportProvider)
GetExportedValueOrDefault<T>() GetExportedValueOrDefault<T>() GetExportedValueOrDefault<T>() GetExportedValueOrDefault<T>()

取得具有從指定型別參數或指定型別的預設值衍生之合約名稱的匯出物件,或者如果有一個以上相符的匯出物件,則擲回例外狀況。Gets the exported object with the contract name derived from the specified type parameter or the default value for the specified type, or throws an exception if there is more than one matching exported object.

(Inherited from ExportProvider)
GetExportedValueOrDefault<T>(String) GetExportedValueOrDefault<T>(String) GetExportedValueOrDefault<T>(String) GetExportedValueOrDefault<T>(String)

取得具有指定合約名稱或指定型別預設值的匯出物件,或者如果有一個以上相符的匯出物件,則擲回例外狀況。Gets the exported object with the specified contract name or the default value for the specified type, or throws an exception if there is more than one matching exported object.

(Inherited from ExportProvider)
GetExportedValues<T>() GetExportedValues<T>() GetExportedValues<T>() GetExportedValues<T>()

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

(Inherited from ExportProvider)
GetExportedValues<T>(String) GetExportedValues<T>(String) GetExportedValues<T>(String) GetExportedValues<T>(String)

取得具有指定合約名稱的所有匯出物件。Gets all the exported objects with the specified contract name.

(Inherited from ExportProvider)
GetExports(ImportDefinition) GetExports(ImportDefinition) GetExports(ImportDefinition) GetExports(ImportDefinition)

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

(Inherited from ExportProvider)
GetExports(ImportDefinition, AtomicComposition) GetExports(ImportDefinition, AtomicComposition) GetExports(ImportDefinition, AtomicComposition) GetExports(ImportDefinition, AtomicComposition)

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

(Inherited from ExportProvider)
GetExports(Type, Type, String) GetExports(Type, Type, String) GetExports(Type, Type, String) GetExports(Type, Type, String)

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

(Inherited from ExportProvider)
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.

(Inherited from ExportProvider)
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.

(Inherited from ExportProvider)
GetExports<T>() GetExports<T>() GetExports<T>() GetExports<T>()

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

(Inherited from ExportProvider)
GetExports<T>(String) GetExports<T>(String) GetExports<T>(String) GetExports<T>(String)

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

(Inherited from ExportProvider)
GetExportsCore(ImportDefinition, AtomicComposition) GetExportsCore(ImportDefinition, AtomicComposition) GetExportsCore(ImportDefinition, AtomicComposition) GetExportsCore(ImportDefinition, AtomicComposition)

傳回符合指定之匯入條件的所有匯出。Returns all exports that match the conditions of the specified import.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
OnExportsChanged(ExportsChangeEventArgs) OnExportsChanged(ExportsChangeEventArgs) OnExportsChanged(ExportsChangeEventArgs) OnExportsChanged(ExportsChangeEventArgs)

引發 ExportsChanged 事件。Raises the ExportsChanged event.

(Inherited from ExportProvider)
OnExportsChanging(ExportsChangeEventArgs) OnExportsChanging(ExportsChangeEventArgs) OnExportsChanging(ExportsChangeEventArgs) OnExportsChanging(ExportsChangeEventArgs)

引發 ExportsChanging 事件。Raises the ExportsChanging event.

(Inherited from ExportProvider)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
TryGetExports(ImportDefinition, AtomicComposition, IEnumerable<Export>) TryGetExports(ImportDefinition, AtomicComposition, IEnumerable<Export>) TryGetExports(ImportDefinition, AtomicComposition, IEnumerable<Export>) TryGetExports(ImportDefinition, AtomicComposition, IEnumerable<Export>)

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

(Inherited from ExportProvider)

事件

ExportsChanged ExportsChanged ExportsChanged ExportsChanged

ExportProvider 中的匯出變更時發生。Occurs when the exports in the ExportProvider change.

(Inherited from ExportProvider)
ExportsChanging ExportsChanging ExportsChanging ExportsChanging

當提供的匯出變更時發生。Occurs when the provided exports are changing.

(Inherited from ExportProvider)

適用於