Share via


TypedAsyncResult<T> 建構函式

定義

初始化 TypedAsyncResult<T> 類別的新執行個體。

多載

TypedAsyncResult<T>(Object)

初始化 TypedAsyncResult<T> 類別的新執行個體,這個執行個體具有狀態物件。

TypedAsyncResult<T>(AsyncCallback, Object)

初始化 TypedAsyncResult<T> 類別的新執行個體,這個執行個體具有回呼委派和狀態物件。

TypedAsyncResult<T>(Object)

初始化 TypedAsyncResult<T> 類別的新執行個體,這個執行個體具有狀態物件。

public:
 TypedAsyncResult(System::Object ^ state);
public TypedAsyncResult (object state);
new System.IdentityModel.TypedAsyncResult<'T> : obj -> System.IdentityModel.TypedAsyncResult<'T>
Public Sub New (state As Object)

參數

state
Object

使用者定義的物件,這個物件符合或包含非同步作業的相關資訊。

備註

如果您的 TypedAsyncResult<T> 實例不需要回呼委派,請使用這個建構函式。

適用於

TypedAsyncResult<T>(AsyncCallback, Object)

初始化 TypedAsyncResult<T> 類別的新執行個體,這個執行個體具有回呼委派和狀態物件。

public:
 TypedAsyncResult(AsyncCallback ^ callback, System::Object ^ state);
public TypedAsyncResult (AsyncCallback callback, object state);
new System.IdentityModel.TypedAsyncResult<'T> : AsyncCallback * obj -> System.IdentityModel.TypedAsyncResult<'T>
Public Sub New (callback As AsyncCallback, state As Object)

參數

callback
AsyncCallback

在非同步作業完成時所呼叫的方法。

state
Object

使用者定義的物件,這個物件符合或包含非同步作業的相關資訊。

適用於