Пример #1
0
        public ResultInfoEbayAccount GetAccount()
        {
            var req = new GetAccountRequestType();

            GetAccountResponseType response = base.GetServiceData(Service.GetAccount, req);
            var rez = new ResultInfoEbayAccount(response);

            rez.IncrementRequests("GetAccount");
            return(rez);
        }
        public GlobalBank.Commercial.EBanking.Modules.EFT.BusinessEntities.Account[] GetAccounts(string userName)
        {
            GetAccountRequestType request = new GetAccountRequestType();

            request.userName = userName;
            GetAccountResponseType response     = _proxy.GetAccounts(request);
            List <Account>         userAccounts = new List <Account>();

            foreach (AccountTableEntityType account in response.userAccounts)
            {
                userAccounts.Add(_translator.Translate <Account>(account));
            }
            return(userAccounts.ToArray());
        }
Пример #3
0
        public GlobalBankServices.DataTypes.GetAccountResponseType GetAccounts(GlobalBankServices.DataTypes.GetAccountRequestType request)
        {
            GetAccountResponseType response = new GetAccountResponseType();

            AccountTableEntityType[] userAccounts = _accounts.FindAll(new Predicate <AccountTableEntityType>(delegate(AccountTableEntityType expectedAccount)
            {
                // Do not do this. This is not secure.
                // This is for only simplicity in our perf and
                // stress testing so we don't need 10000 lines in our ctor
                return(request.userName.StartsWith(expectedAccount.ownerId));

                // Do this instead
                //return expectedAccount.ownerId == request.userName;
            }
                                                                                                             )).ToArray();
            response.userAccounts = userAccounts;
            return(response);
        }
Пример #4
0
 public ResultInfoEbayAccount(GetAccountResponseType response)
     : base(response)
 {
     _response = response;
 }