public Task <AccountCollectionResult> GetAccountsAsync(AccountArgs?args, PagingArgs?paging) { return(ManagerInvoker.Default.InvokeAsync(this, async() => { ExecutionContext.Current.OperationType = OperationType.Read; EntityBase.CleanUp(args); if (_getAccountsOnPreValidateAsync != null) { await _getAccountsOnPreValidateAsync(args, paging).ConfigureAwait(false); } MultiValidator.Create() .Add(args.Validate(nameof(args)).Entity(AccountArgsValidator.Default)) .Additional((__mv) => _getAccountsOnValidate?.Invoke(__mv, args, paging)) .Run().ThrowOnError(); if (_getAccountsOnBeforeAsync != null) { await _getAccountsOnBeforeAsync(args, paging).ConfigureAwait(false); } var __result = await AccountDataSvc.GetAccountsAsync(args, paging).ConfigureAwait(false); if (_getAccountsOnAfterAsync != null) { await _getAccountsOnAfterAsync(__result, args, paging).ConfigureAwait(false); } Cleaner.Clean(__result); return __result; })); }
public Task <AccountCollectionResult> GetAccountsAsync(AccountArgs?args, PagingArgs?paging) { return(DataSvcInvoker.Current.InvokeAsync(this, async() => { var __result = await _data.GetAccountsAsync(args, paging).ConfigureAwait(false); return __result; })); }
public Task <AccountCollectionResult> GetAccountsAsync(AccountArgs?args, PagingArgs?paging) { return(DataInvoker.Current.InvokeAsync(this, async() => { AccountCollectionResult __result = new AccountCollectionResult(paging); var __dataArgs = CosmosMapper.Default.CreateArgs("Account", __result.Paging !, PartitionKey.None, onCreate: _onDataArgsCreate); __result.Result = _cosmos.Container(__dataArgs).Query(q => _getAccountsOnQuery?.Invoke(q, args, __dataArgs) ?? q).SelectQuery <AccountCollection>(); return await Task.FromResult(__result).ConfigureAwait(false); }));
public Task <AccountCollectionResult> GetAccountsAsync(AccountArgs?args, PagingArgs?paging) { return(ManagerInvoker.Current.InvokeAsync(this, async() => { ExecutionContext.Current.OperationType = OperationType.Read; Cleaner.CleanUp(args); args.Validate(nameof(args)).Entity(AccountArgsValidator.Default).Run().ThrowOnError(); return Cleaner.Clean(await _dataService.GetAccountsAsync(args, paging).ConfigureAwait(false)); })); }
public static Task <AccountCollectionResult> GetAccountsAsync(AccountArgs?args, PagingArgs?paging) { return(DataSvcInvoker.Default.InvokeAsync(typeof(AccountDataSvc), async() => { var __result = await Factory.Create <IAccountData>().GetAccountsAsync(args, paging).ConfigureAwait(false); if (_getAccountsOnAfterAsync != null) { await _getAccountsOnAfterAsync(__result, args, paging).ConfigureAwait(false); } return __result; })); }
public Task <AccountCollectionResult> GetAccountsAsync(AccountArgs?args, PagingArgs?paging) { return(DataInvoker.Default.InvokeAsync(this, async() => { AccountCollectionResult __result = new AccountCollectionResult(paging); var __dataArgs = CosmosMapper.Default.CreateArgs("Account", __result.Paging !, PartitionKey.None); _onDataArgsCreate?.Invoke(__dataArgs); if (_getAccountsOnBeforeAsync != null) { await _getAccountsOnBeforeAsync(args, __dataArgs).ConfigureAwait(false); } __result.Result = CosmosDb.Default.Container(__dataArgs).Query(q => _getAccountsOnQuery == null ? q : _getAccountsOnQuery(q, args, __dataArgs)).SelectQuery <AccountCollection>(); if (_getAccountsOnAfterAsync != null) { await _getAccountsOnAfterAsync(__result, args).ConfigureAwait(false); } return __result; }, new BusinessInvokerArgs {
/// <summary> /// Create a Account resource with the given unique name, arguments, and options. /// </summary> /// /// <param name="name">The unique name of the resource</param> /// <param name="args">The arguments used to populate this resource's properties</param> /// <param name="options">A bag of options that control this resource's behavior</param> public Account(string name, AccountArgs?args = null, CustomResourceOptions?options = null) : base("aws:apigateway/account:Account", name, args ?? ResourceArgs.Empty, MakeResourceOptions(options, "")) { }
/// <summary> /// Create a Account resource with the given unique name, arguments, and options. /// </summary> /// /// <param name="name">The unique name of the resource</param> /// <param name="args">The arguments used to populate this resource's properties</param> /// <param name="options">A bag of options that control this resource's behavior</param> public Account(string name, AccountArgs?args = null, CustomResourceOptions?options = null) : base("aws:securityhub/account:Account", name, args ?? new AccountArgs(), MakeResourceOptions(options, "")) { }
public Task <WebApiAgentResult <AccountCollectionResult> > GetAccountsAsync(AccountArgs?args, PagingArgs?paging = null, WebApiRequestOptions?requestOptions = null) => AccountServiceAgent.GetAccountsAsync(args, paging, requestOptions);
/// <summary> /// Create a Account resource with the given unique name, arguments, and options. /// </summary> /// /// <param name="name">The unique name of the resource</param> /// <param name="args">The arguments used to populate this resource's properties</param> /// <param name="options">A bag of options that control this resource's behavior</param> public Account(string name, AccountArgs?args = null, CustomResourceOptions?options = null) : base("aiven:index/account:Account", name, args ?? new AccountArgs(), MakeResourceOptions(options, "")) { }
public async Task <AccountCollectionResult> GetAccountsAsync(AccountArgs?args, PagingArgs?paging) => await ManagerInvoker.Current.InvokeAsync(this, async() => { Cleaner.CleanUp(args); await args.Validate(nameof(args)).Entity().With <IValidator <AccountArgs> >().RunAsync(throwOnError: true).ConfigureAwait(false); return(Cleaner.Clean(await _dataService.GetAccountsAsync(args, paging).ConfigureAwait(false))); }, BusinessInvokerArgs.Read).ConfigureAwait(false);
public Task <WebApiAgentResult <AccountCollectionResult> > GetAccountsAsync(AccountArgs?args, PagingArgs?paging = null, WebApiRequestOptions?requestOptions = null) { return(GetCollectionResultAsync <AccountCollectionResult, AccountCollection, Account>("api/v1/banking/accounts", requestOptions: requestOptions, args: new WebApiArg[] { new WebApiArg <AccountArgs?>("args", args, WebApiArgType.FromUriUseProperties), new WebApiPagingArgsArg("paging", paging) })); }
/// <summary> /// Perform the query filering for the GetAccounts. /// </summary> private IQueryable <Model.Account> GetAccountsOnQuery(IQueryable <Model.Account> query, AccountArgs?args, ICosmosDbArgs dbArgs) { if (args == null || args.IsInitial) { return(query); } // Where an argument value has been specified then add as a filter - the WhereWhen and WhereWith are enabled by Beef. var q = query.WhereWhen(!(args.OpenStatus == null) && args.OpenStatus != OpenStatus.All, x => x.OpenStatus == args.OpenStatus !.Code); q = q.WhereWith(args?.ProductCategory, x => x.ProductCategory == args !.ProductCategory !.Code); // With checking IsOwned a simple false check cannot be performed with Cosmos; assume "not IsDefined" is equivalent to false also. if (args !.IsOwned == null) { return(q); } if (args.IsOwned == true) { return(q.Where(x => x.IsOwned == true)); } else { return(q.Where(x => !x.IsOwned.IsDefined() || !x.IsOwned)); } }
public Task <AccountCollectionResult> GetAccountsAsync(AccountArgs?args, PagingArgs?paging) => DataInvoker.Current.InvokeAsync(this, async() => {