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

定義

開始服務主機關閉時所叫用的非同步作業。Begins an asynchronous operation invoked on the close of the service host.

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

指定必須在逾時前完成關閉作業之寬限時間的 TimeSpanThe TimeSpan that specifies how long the on-close operation has to complete before timing out.

callback
AsyncCallback

AsyncCallback 委派,會接收非同步作業關閉完成的通知。The AsyncCallback delegate that receives the notification of the asynchronous operation on-close completion.

state
Object

應用程式所指定的物件,其中包含與非同步關閉作業相關的狀態資訊。An object, specified by the application, that contains state information associated with the asynchronous on-close operation.

傳回

IAsyncResult

IAsyncResult,這個物件會參考非同步關閉作業。The IAsyncResult that references the asynchronous on-close operation.

適用於