Example #1
0
        public List <IPartnerAccount> ListPartnerAccountsByPartner(string partnerIdentifier)
        {
            if (string.IsNullOrWhiteSpace(partnerIdentifier))
            {
                throw new ArgumentNullException("partnerIdentifier");
            }

            DalPartnerAccount dal = new DalPartnerAccount(this.storageAccount, this.container, partnerIdentifier);

            return(dal.List().ConvertAll <IPartnerAccount>(partnerAccount => partnerAccount));
        }
Example #2
0
        public List <IPartnerAccount> ListPartnerAccounts()
        {
            List <IPartnerAccount> result = new List <IPartnerAccount>();

            DalPartner dalPartner = new DalPartner(this.storageAccount, this.container);

            foreach (IPartner partner in dalPartner.List())
            {
                DalPartnerAccount dal = new DalPartnerAccount(this.storageAccount, this.container, partner.Identifier);
                result.AddRange(dal.List().ConvertAll <IPartnerAccount>(partnerAccount => partnerAccount));
            }

            return(result);
        }
Example #3
0
        public void DeletePartnerAccount(IPartnerAccount partnerAccount)
        {
            if (partnerAccount == null)
            {
                throw new ArgumentNullException("partnerAccount");
            }

            if (string.IsNullOrEmpty(partnerAccount.PartnerIdentifier))
            {
                throw new ArgumentException("IPartnerAccount must have a valid PartnerIdentifier.", "partnerAccount");
            }

            DalPartnerAccount dal = new DalPartnerAccount(this.storageAccount, this.container, partnerAccount.PartnerIdentifier);

            dal.Delete(partnerAccount as PartnerAccount);
        }
Example #4
0
        public IPartnerAccount GetPartnerAccount(string partnerAccountIdentifier, string partnerIdentifier)
        {
            if (partnerAccountIdentifier == null)
            {
                throw new ArgumentNullException("partnerAccountIdentifier");
            }

            if (partnerIdentifier == null)
            {
                throw new ArgumentNullException("partnerIdentifier");
            }

            DalPartnerAccount dal = new DalPartnerAccount(this.storageAccount, this.container, partnerIdentifier);

            return(dal.Get(partnerAccountIdentifier));
        }
Example #5
0
        public void SavePartnerAccount(IPartnerAccount partnerAccount)
        {
            DalPartnerAccount dal = new DalPartnerAccount(this.storageAccount, this.container, partnerAccount.PartnerIdentifier);

            dal.Save(partnerAccount as PartnerAccount);
        }