CommunicationObject.OnEndClose(IAsyncResult) 方法

定義

在關閉通訊物件時完成非同步作業。Completes an asynchronous operation on the close of a communication object.

protected:
 abstract void OnEndClose(IAsyncResult ^ result);
protected abstract void OnEndClose (IAsyncResult result);
abstract member OnEndClose : IAsyncResult -> unit
Protected MustOverride Sub OnEndClose (result As IAsyncResult)

參數

result
IAsyncResult

IAsyncResult,在呼叫 OnEndClose(IAsyncResult) 方法時所傳回。The IAsyncResult that is returned by a call to the OnEndClose(IAsyncResult) method.

例外狀況

通訊物件並非處於 OpenedOpening 狀態,無法修改。The communication object is not in a Opened or Opening state and cannot be modified.

通訊物件處於 ClosingClosed 狀態,無法修改。The communication object is in a Closing or Closed state and cannot be modified.

通訊物件處於 Faulted 狀態,無法修改。The communication object is in a Faulted state and cannot be modified.

已超過為作業分配的預設時間間隔,該作業未完成。The default interval of time that was allotted for the operation was exceeded before the operation was completed.

備註

如果通訊物件尚未處於 EndClose(IAsyncResult) 狀態,OnEndClose(IAsyncResult) 方法就會呼叫 ClosedThe EndClose(IAsyncResult) method calls OnEndClose(IAsyncResult) if the communication object is not already in a Closed state.

適用於