PeekCompletedEventArgs.AsyncResult 屬性

定義

取得或設定要求的非同步作業結果。

public:
 property IAsyncResult ^ AsyncResult { IAsyncResult ^ get(); void set(IAsyncResult ^ value); };
public IAsyncResult AsyncResult { get; set; }
member this.AsyncResult : IAsyncResult with get, set
Public Property AsyncResult As IAsyncResult

屬性值

IAsyncResult,包含與窺視作業相關聯的資料。

備註

AsyncResult 會識別進行中或已完成的異步操作。 屬性包含的數據可協助判斷要完成的數個潛在異步操作之哪一項,而當傳遞至事件處理程式時,可存取 EndPeek 與已完成作業相關聯的訊息。

當您呼叫 BeginPeek時, IAsyncResult 會立即傳回 ,即使訊息存在,也尚未擷取,因為作業尚未完成。 AsyncResult表示異步操作的狀態。 BeginPeek 會建立 物件,這會在整個作業中修改,直到 EndPeek 完成為止。

適用於

另請參閱