示例#1
0
        private void GenerateApiKey(IRandomDomainService randomDS)
        {
            const int apiKeyLength = 22;

            ApiKey = randomDS.GenerateRandomAlphanumericString(apiKeyLength);
        }
示例#2
0
 public RandomDomain(IRandomDomainService randomDomainService)
 {
     _randomDomainService = randomDomainService;
 }
示例#3
0
        public static Merchant RegisterNewMerchant(string name, CreditCardInformation creditCardInformation, IRandomDomainService randomDS)
        {
            var newMerchant = new Merchant
            {
                Name = name,
                CreditCardInformation = creditCardInformation
            };

            newMerchant.GenerateApiKey(randomDS);

            return(newMerchant);
        }