TypedAsyncResult<T> 构造函数
定义
初始化 TypedAsyncResult<T> 类的新实例。Initializes a new instance of the TypedAsyncResult<T> class.
重载
| TypedAsyncResult<T>(Object) |
初始化 TypedAsyncResult<T> 类的新实例,它包含状态对象。Initializes a new instance of the TypedAsyncResult<T> class that has a state object. |
| TypedAsyncResult<T>(AsyncCallback, Object) |
初始化 TypedAsyncResult<T> 类的新实例,它包含回调委托和状态对象。Initializes a new instance of the TypedAsyncResult<T> class that has a callback delegate and a state object. |
TypedAsyncResult<T>(Object)
初始化 TypedAsyncResult<T> 类的新实例,它包含状态对象。Initializes a new instance of the TypedAsyncResult<T> class that has a state object.
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
一个用户定义的对象,限定或包含有关异步操作的信息。A user-defined object that qualifies or contains information about an asynchronous operation.
注解
如果你的 TypedAsyncResult<T> 实例不需要回调委托,则使用此构造函数。Use this constructor if your TypedAsyncResult<T> instance does not need a callback delegate.
适用于
TypedAsyncResult<T>(AsyncCallback, Object)
初始化 TypedAsyncResult<T> 类的新实例,它包含回调委托和状态对象。Initializes a new instance of the TypedAsyncResult<T> class that has a callback delegate and a state object.
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
异步操作完成时调用的方法。The method to be called when the asynchronous operation completes.
- state
- Object
一个用户定义的对象,限定或包含有关异步操作的信息。A user-defined object that qualifies or contains information about an asynchronous operation.