语言

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

定义

开始在打开服务主机时调用的异步操作。

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

参数

timeout
TimeSpan

指定 TimeSpan 打开操作在超时前必须完成多长时间。

callback
AsyncCallback

AsyncCallback接收异步操作打开完成通知的委托。

state
Object

应用程序指定的对象,包含与异步打开操作关联的状态信息。

返回

该 IAsyncResult 引用异步打开操作。

适用于