ServiceHostBase.OnBeginClose(TimeSpan, AsyncCallback, Object) 方法

定義

開始服務主機關閉時所叫用的非同步作業。

protected:
 override IAsyncResult ^ OnBeginClose(TimeSpan timeout, AsyncCallback ^ callback, System::Object ^ state);
protected override sealed IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state);
protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state);
override this.OnBeginClose : TimeSpan * AsyncCallback * obj -> IAsyncResult
Protected Overrides NotOverridable Function OnBeginClose (timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult
Protected Overrides Function OnBeginClose (timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

參數

timeout
TimeSpan

指定必須在逾時前完成關閉作業之寬限時間的 TimeSpan

callback
AsyncCallback

AsyncCallback 委派,會接收非同步作業關閉完成的通知。

state
Object

應用程式所指定的物件,其中包含與非同步關閉作業相關的狀態資訊。

傳回

IAsyncResult,這個物件會參考非同步關閉作業。

適用於