public async void GetWorkDetailsAsync([Converter("ToJSON")] string works_json, int flags, [Converter("Callback")] int hCallback) { var works = JsonConvert.DeserializeObject <long[]>(works_json); var workchapters = await wvp.GetWorkDetailsAsync(works, (WorkDetailsFlags)flags); await wvp.DoOnMainThreadAsync(() => { wvp.CallJavascriptAsync("Ao3Track.Callbacks.call", hCallback, workchapters); }).ConfigureAwait(false); }
public IAsyncOperation <string> GetWorkDetailsAsync([ReadOnlyArray] long[] works, long flags) { return(Task.Run(async() => { var result = await wvp.GetWorkDetailsAsync(works, (WorkDetailsFlags)flags); return JsonConvert.SerializeObject(result); }).AsAsyncOperation()); }
public async void GetWorkDetailsAsync(long[] works, int flags, [Converter("Callback")] int hCallback) { var workchapters = await wvp.GetWorkDetailsAsync(works, (WorkDetailsFlags)flags); await wvp.DoOnMainThreadAsync(() => { wvp.CallJavascriptAsync("Ao3Track.Callbacks.call", hCallback, workchapters); }).ConfigureAwait(false); }