CompositionHost 類別

定義

從指定提供者組合的輕量型組合容器。A lightweight composition container that is assembled from specified providers.

public ref class CompositionHost sealed : System::Composition::CompositionContext, IDisposable
public sealed class CompositionHost : System.Composition.CompositionContext, IDisposable
type CompositionHost = class
    inherit CompositionContext
    interface IDisposable
Public NotInheritable Class CompositionHost
Inherits CompositionContext
Implements IDisposable
繼承
CompositionHost
實作

方法

CreateCompositionHost(ExportDescriptorProvider[])

使用指定之陣列提供者,建立組合主機。Creates the composition host with the specified array of providers.

CreateCompositionHost(IEnumerable<ExportDescriptorProvider>)

使用指定之集合提供者,建立組合主機。Creates the composition host with the specified collection of providers.

Dispose()

釋放組合主機和所有全域共用組件。Releases the composition host and any globally shared parts.

Equals(Object)

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

(繼承來源 Object)
GetExport(CompositionContract)

擷取符合指定合約的匯出。Retrieves the export that matches the specified contract.

(繼承來源 CompositionContext)
GetExport(Type)

擷取符合指定類型的匯出。Retrieves the export that matches the specified type.

(繼承來源 CompositionContext)
GetExport(Type, String)

擷取符合指定名稱與類型的匯出。Retrieves the export that matches the specified name and type.

(繼承來源 CompositionContext)
GetExport<TExport>()

擷取符合指定泛型型別參數的匯出。Retrieves the export that matches the specified generic type parameter.

(繼承來源 CompositionContext)
GetExport<TExport>(String)

擷取符合指定泛型型別參數與合約名稱的匯出。Retrieves the export that matches the specified generic type parameter and contract name.

(繼承來源 CompositionContext)
GetExports(Type)

擷取符合指定類型之所有匯出的集合。Retrieves a collection of all exports that match the specified type.

(繼承來源 CompositionContext)
GetExports(Type, String)

擷取符合指定合約名稱與類型的所有匯出。Retrieves all exports that match the specified contract name and type.

(繼承來源 CompositionContext)
GetExports<TExport>()

擷取符合指定泛型型別參數的所有匯出。Retrieves all exports that match the specified generic type parameter.

(繼承來源 CompositionContext)
GetExports<TExport>(String)

擷取符合指定泛型型別參數與合約名稱的所有匯出。Retrieves all exports that match the specified generic type parameter and contract name.

(繼承來源 CompositionContext)
GetHashCode()

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

(繼承來源 Object)
GetType()

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

(繼承來源 Object)
MemberwiseClone()

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

(繼承來源 Object)
ToString()

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

(繼承來源 Object)
TryGetExport(CompositionContract, Object)

從組合內容擷取指定的匯出。Retrieves the specified export from the composition context.

TryGetExport(Type, Object)

傳回符合指定之類型的匯出,如果找不到相符項目則傳回 nullReturns the export that matches the specified type, or returns null if no match is found.

(繼承來源 CompositionContext)
TryGetExport(Type, String, Object)

傳回符合指定之合約名稱及類型的匯出,如果找不到相符項目則傳回 nullReturns the export that matches the specified contract name and type, or returns null if no match is found.

(繼承來源 CompositionContext)
TryGetExport<TExport>(String, TExport)

傳回符合指定之泛型類型參數及合約名稱的匯出,如果找不到相符項目則傳回 nullReturns the export that matches the specified generic type parameter and contract name, or returns null if no match is found.

(繼承來源 CompositionContext)
TryGetExport<TExport>(TExport)

傳回符合指定之泛型類型參數的匯出,如果找不到相符項目則傳回 nullReturns the export that matches the specified generic type parameter, or returns null if no match is found.

(繼承來源 CompositionContext)

擴充方法

SatisfyImports(CompositionContext, Object)

符合來自指定內容之指定物件的匯入。Satisfies the imports of the specified object from the specified context.

SatisfyImports(CompositionContext, Object, AttributedModelProvider)

使用指定的慣例,符合來自指定內容之指定物件的匯入。Satisfies the imports of the specified object from the specified context, using the specified conventions.

適用於