private void GenerateApiKey(IRandomDomainService randomDS) { const int apiKeyLength = 22; ApiKey = randomDS.GenerateRandomAlphanumericString(apiKeyLength); }
public RandomDomain(IRandomDomainService randomDomainService) { _randomDomainService = randomDomainService; }
public static Merchant RegisterNewMerchant(string name, CreditCardInformation creditCardInformation, IRandomDomainService randomDS) { var newMerchant = new Merchant { Name = name, CreditCardInformation = creditCardInformation }; newMerchant.GenerateApiKey(randomDS); return(newMerchant); }