ContextCallback 代理人

定義

代表要在新的內容中呼叫的方法。

public delegate void ContextCallback(System::Object ^ state);
public delegate void ContextCallback(object state);
public delegate void ContextCallback(object? state);
[System.Runtime.InteropServices.ComVisible(true)]
public delegate void ContextCallback(object state);
type ContextCallback = delegate of obj -> unit
[<System.Runtime.InteropServices.ComVisible(true)>]
type ContextCallback = delegate of obj -> unit
Public Delegate Sub ContextCallback(state As Object)

參數

state
Object

物件,它包含回呼方法所使用的資訊。

屬性

備註

ContextCallbackExecutionContext.RunSecurityContext.Run 方法使用。 ContextCallback 表示在提供的內容中執行的方法。 完成方法執行時,內容會還原至其先前的狀態。

將回呼方法傳遞至 ContextCallback 建構函式,以建立委派。 您的方法必須顯示此處的簽章。

擴充方法

GetMethodInfo(Delegate)

取得表示特定委派所代表之方法的物件。

適用於