Пример #1
0
 public override async Task <GrpcAccountList> SearchAccounts(GrpcSearchAccountsReq request, ServerCallContext context)
 {
     try
     {
         return(await MainController.SearchAccounts(request));
     }
     catch (Exception e)
     {
         throw HandleException(e);
     }
 }
Пример #2
0
 public static async Task <GrpcAccountList> SearchAccounts(GrpcSearchAccountsReq request)
 {
     try
     {
         return(await Client.SearchAccountsAsync(request));
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #3
0
        public static async Task <GrpcAccountList> SearchAccounts(GrpcSearchAccountsReq grpcRequest)
        {
            try
            {
                var request = GrpcSearchAccountReqAdapter.Adapt(grpcRequest);
                var result  = await AccountUseCases.Search.Execute(request);

                return(AccountListPresenter.Present(result));
            }
            catch (Exception)
            {
                throw;
            }
        }
 public static SearchAccountsReq Adapt(GrpcSearchAccountsReq grpcRequest)
 {
     try
     {
         return(new SearchAccountsReq()
         {
             Name = new StringSearchField(),
             User = new StringSearchField(),
             Pagination = PaginationInAdapter.Adapt(grpcRequest.Pagination)
         });
     }
     catch (Exception)
     {
         throw;
     }
 }