public async Task <IEnumerable <BillingInvoice> > GetR(BillingInvoiceSearch option) { return(await hubContext.DoAsync(option.ConnectionId, async (notifier, token) => { var result = (await billingInvoiceProcessor.GetAsync(option, token)).ToArray(); notifier?.UpdateState(); return result; })); }
public async Task <BillingInvoiceResult> GetAsync(string SessionKey, BillingInvoiceSearch searchOption, string connectionId) { return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token => { var notifier = hubContext.CreateNotifier(connectionId); var result = await billingInvoiceProcessor.GetAsync(searchOption, token); notifier?.UpdateState(); return new BillingInvoiceResult { ProcessResult = new ProcessResult { Result = true }, BillingInvoices = result.ToList(), }; }, logger, connectionId)); }