ChannelListenerBase.BeginWaitForChannel(TimeSpan, AsyncCallback, Object) 方法

定義

在衍生類別內實作時,開始等候通道抵達的非同步作業。When implemented in a derived class, begins an asynchronous operation to wait for a channel to arrive.

public:
 virtual IAsyncResult ^ BeginWaitForChannel(TimeSpan timeout, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginWaitForChannel (TimeSpan timeout, AsyncCallback callback, object state);
abstract member BeginWaitForChannel : TimeSpan * AsyncCallback * obj -> IAsyncResult
override this.BeginWaitForChannel : TimeSpan * AsyncCallback * obj -> IAsyncResult
Public Function BeginWaitForChannel (timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

參數

timeout
TimeSpan

指定在逾時前必須等候通道作業完成之時間的 TimeSpanThe TimeSpan that specifies how long the wait for a channel operation has to complete before timing out.

callback
AsyncCallback

AsyncCallback 委派 (Delegate),可在非同步等候通道作業完成時,收到通知。The AsyncCallback delegate that receives the notification of the asynchronous completion of the wait for a channel operation.

state
Object

應用程式所指定的物件,其中包含與等候通道之非同步作業相關聯的狀態資訊。An object, specified by the application, that contains state information associated with the asynchronous wait for a channel operation.

傳回

參考非同步等候通道作業的 IAsyncResultThe IAsyncResult that references the asynchronous wait for a channel operation.

實作

例外狀況

通道接聽程式尚未開啟,所以無法使用。The channel listener has not been opened and so cannot be used.

適用於