CommunicationObject.EndOpen(IAsyncResult) 方法

定義

完成非同步作業以開啟通訊物件。Completes an asynchronous operation to open a communication object.

public:
 virtual void EndOpen(IAsyncResult ^ result);
public void EndOpen (IAsyncResult result);
abstract member EndOpen : IAsyncResult -> unit
override this.EndOpen : IAsyncResult -> unit
Public Sub EndOpen (result As IAsyncResult)

參數

result
IAsyncResult

IAsyncResult,在呼叫 BeginClose 方法時所傳回。The IAsyncResult that is returned by a call to the BeginClose 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.

備註

Open 方法會提供這個方法的同步版本。A synchronous version of this method is provided by the Open method.

適用於