public Task <Balance?> GetBalanceAsync(string?accountId) { return(ManagerInvoker.Current.InvokeAsync(this, async() => { ExecutionContext.Current.OperationType = OperationType.Read; Cleaner.CleanUp(accountId); accountId.Validate(nameof(accountId)).Mandatory().Run().ThrowOnError(); return Cleaner.Clean(await _dataService.GetBalanceAsync(accountId).ConfigureAwait(false)); })); }
public async Task <Balance?> GetBalanceAsync(string?accountId) => await ManagerInvoker.Current.InvokeAsync(this, async() => { Cleaner.CleanUp(accountId); await accountId.Validate(nameof(accountId)).Mandatory().RunAsync(throwOnError: true).ConfigureAwait(false); return(Cleaner.Clean(await _dataService.GetBalanceAsync(accountId).ConfigureAwait(false))); }, BusinessInvokerArgs.Read).ConfigureAwait(false);