ImportEngine ImportEngine ImportEngine ImportEngine Class

定義

執行容器的撰寫。Performs composition for containers.

public ref class ImportEngine : IDisposable, System::ComponentModel::Composition::ICompositionService
public class ImportEngine : IDisposable, System.ComponentModel.Composition.ICompositionService
type ImportEngine = class
    interface ICompositionService
    interface IDisposable
Public Class ImportEngine
Implements ICompositionService, IDisposable
繼承
ImportEngineImportEngineImportEngineImportEngine
實作

備註

這個類別會在內部使用CompositionContainerThis class is used internally by CompositionContainer. 您通常應該不使用它除非您撰寫一個容器。You should generally not use it unless you are authoring a container.

重要

此類型會實作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.

建構函式

ImportEngine(ExportProvider) ImportEngine(ExportProvider) ImportEngine(ExportProvider) ImportEngine(ExportProvider)

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

ImportEngine(ExportProvider, Boolean) ImportEngine(ExportProvider, Boolean) ImportEngine(ExportProvider, Boolean) ImportEngine(ExportProvider, Boolean)

初始化 ImportEngine 類別的新執行個體,可以選擇是否為安全執行緒模式。Initializes a new instance of the ImportEngine class, optionally in thread-safe mode.

ImportEngine(ExportProvider, CompositionOptions) ImportEngine(ExportProvider, CompositionOptions) ImportEngine(ExportProvider, CompositionOptions) ImportEngine(ExportProvider, CompositionOptions)

使用指定的選項,初始化 ImportEngine 類別的新執行個體。Initializes a new instance of the ImportEngine class with the specified options.

方法

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

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

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

釋放 ImportEngine 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the ImportEngine 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)
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)
PreviewImports(ComposablePart, AtomicComposition) PreviewImports(ComposablePart, AtomicComposition) PreviewImports(ComposablePart, AtomicComposition) PreviewImports(ComposablePart, AtomicComposition)

預覽在指定部分的所有必要匯入,以便不用實際設定,就確定能夠滿足這些匯入。Previews all the required imports for the specified part to make sure that they can be satisfied, without actually setting them.

ReleaseImports(ComposablePart, AtomicComposition) ReleaseImports(ComposablePart, AtomicComposition) ReleaseImports(ComposablePart, AtomicComposition) ReleaseImports(ComposablePart, AtomicComposition)

釋放所有匯出,這些匯出用以滿足所指定部分的匯入。Releases all the exports used to satisfy the imports of the specified part.

SatisfyImports(ComposablePart) SatisfyImports(ComposablePart) SatisfyImports(ComposablePart) SatisfyImports(ComposablePart)

滿足所指定部分的匯入。Satisfies the imports of the specified part.

SatisfyImportsOnce(ComposablePart) SatisfyImportsOnce(ComposablePart) SatisfyImportsOnce(ComposablePart) SatisfyImportsOnce(ComposablePart)

滿足所指定部分的匯入,而不需註冊重新撰寫。Satisfies the imports of the specified part without registering them for recomposition.

ToString() ToString() ToString() ToString()

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

(Inherited from Object)

Extension Methods

SatisfyImportsOnce(ICompositionService, Object) SatisfyImportsOnce(ICompositionService, Object) SatisfyImportsOnce(ICompositionService, Object) SatisfyImportsOnce(ICompositionService, Object)

藉由使用指定的撰寫服務時,停用重新撰寫的撰寫指定的組件。Composes the specified part by using the specified composition service, with recomposition disabled.

SatisfyImportsOnce(ICompositionService, Object, ReflectionContext) SatisfyImportsOnce(ICompositionService, Object, ReflectionContext) SatisfyImportsOnce(ICompositionService, Object, ReflectionContext) SatisfyImportsOnce(ICompositionService, Object, ReflectionContext)

使用指定的撰寫服務時,與重新撰寫已停用,並使用指定的反映內容撰寫指定的組件。Composes the specified part by using the specified composition service, with recomposition disabled and using the specified reflection context.

適用於