ChannelFactory.OnBeginClose(TimeSpan, AsyncCallback, Object) 方法
定义
对当前通道工厂(具有关联的状态对象)的内部通道工厂,开始一个异步关闭操作。Begins an asynchronous close operation on the inner channel factory of the current channel factory that has a state object associated with it.
protected:
override IAsyncResult ^ OnBeginClose(TimeSpan timeout, AsyncCallback ^ callback, System::Object ^ state);
protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state);
override this.OnBeginClose : TimeSpan * AsyncCallback * obj -> 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 operation has to complete before timing out.
- callback
- AsyncCallback
接收异步操作完成通知的 AsyncCallback 委托。The AsyncCallback delegate that receives the notification of the asynchronous operation completion.
- state
- Object
一个由应用程序指定的对象,包含与异步操作相关联的状态信息。An object, specified by the application, that contains state information associated with the asynchronous operation.
返回
引用异步操作的 IAsyncResult。The IAsyncResult that references the asynchronous operation.
注解
此方法通过回调为操作接收事件处理程序标识的通知。This method receives notification, through a callback, of the identity of the event handler for the operation. 直到内部通道工厂的异步关闭操作返回或发生超时的时候,才会完成操作。The operation is not complete until either the asynchronous close on the inner channel factory returns or the time-out occurs.