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

TimeSpan,指定在超时前必须完成关闭操作的时间。The 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

引用异步关闭操作的 IAsyncResultThe IAsyncResult that references the asynchronous on-close operation.

适用于