如何将 Task.Factory.FromAsync 工厂用于通过“out”参数返回多个值的 end 方法?
begin 方法有这个签名:
public virtual System.IAsyncResult BeginGetCaseStatus(int CaseOID, int ClientOID, System.AsyncCallback @__Callback, object @__UserData)
结束方法是:
public virtual void EndGetCaseStatus(System.IAsyncResult @__AsyncResult, out DTGenericCode[] BasicStatus, out DTGenericCode[] ARStatus)
我可以一些如何使用:
public Task<?> GetCaseStatusAsync(int CaseOID, int ClientOID)
{
return Task.Factory.FromAsync (BeginGetCaseStatus(CaseOID, ClientOID, null, null), EndGetCaseStatus(?, ?));
}