public async Task <string> StartDown(IASync async, string url) { var htmldata = (await async.GetForEmit <IClientPack>().DownHtmlAsync(url))?[0]?.Value <byte[]>(); if (htmldata != null) { return(Encoding.UTF8.GetString(htmldata)); } return(null);// or async.RET(null); }
public async Task <int> TestRec(IASync async, int count) { count--; if (count > 1) { var pk = await async.GetForEmit <IClientPack>().TestRecAsync(count); if (pk.IsError) { return(0); } count = pk.As <int>(); } return(count); }
public async Task <int> TestRec2(IASync async, int count) { count--; if (count > 1) { var tmp = await async.GetForEmit <IClientPack>().TestRecAsync2(count); if (tmp.IsError) { return(0); } count = tmp.As <int>(); } return(count); }