ExportLifetimeContext<T> 類別

定義

儲存物件 ExportFactory<T> 所產生的匯出值及釋放該物件的方法參考。

generic <typename T>
public ref class ExportLifetimeContext sealed : IDisposable
public sealed class ExportLifetimeContext<T> : IDisposable
type ExportLifetimeContext<'T> = class
    interface IDisposable
Public NotInheritable Class ExportLifetimeContext(Of T)
Implements IDisposable

類型參數

T

出口價值的類型。

繼承
ExportLifetimeContext<T>
實作

備註

Important

此類型會實作 IDisposable 介面。 當您完成使用這個物品後,應直接或間接地處理它。 若要直接處置類型,請在 Disposetry/ 區塊中呼叫其 catch 方法。 若要間接處置它,請使用語言建構,例如 using (C#) 或 Using (在 Visual Basic 中)。 如需詳細資訊,請參閱介面主題中的 <使用實作 IDisposable 的物件>一節。

建構函式

名稱 Description
ExportLifetimeContext<T>(T, Action)

初始化 ExportLifetimeContext<T> 類別的新執行個體。

屬性

名稱 Description
Value

取得物件匯出後的值 ExportFactory<T>

方法

名稱 Description
Dispose()

釋放目前類別實例 ExportLifetimeContext<T> 所使用的所有資源,包括其相關的匯出。

Equals(Object)

判斷指定的 物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前實例的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)

適用於