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

適用於