CompositionContext 類別

定義

提供可從組合擷取匯出的方法。Provides methods to retrieve exports from the composition.

public ref class CompositionContext abstract
public abstract class CompositionContext
type CompositionContext = class
Public MustInherit Class CompositionContext
繼承
CompositionContext
衍生

建構函式

CompositionContext()

初始化 CompositionContext 類別的新執行個體。Initializes a new instance of the CompositionContext class.

方法

Equals(Object)

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

(繼承來源 Object)
GetExport(CompositionContract)

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

GetExport(Type)

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

GetExport(Type, String)

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

GetExport<TExport>()

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

GetExport<TExport>(String)

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

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.

GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetType()

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

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

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

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

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

TryGetExport(Type, Object)

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

TryGetExport(Type, String, Object)

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

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.

TryGetExport<TExport>(TExport)

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

擴充方法

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.

適用於