Example #1
0
        public EmailGenerator()
        {
            _firstNameGenerator  = new RandomSyllabileGenerator(3, 8);
            _secondNameGenerator = new RandomSyllabileGenerator(3, 8);

            _domainNameGenerator     = new RandomSyllabileGenerator(2, 6);
            _topLevelDomainGenerator = new RandomSyllabileGenerator(2, 3);
        }
Example #2
0
        /// <summary>
        /// Constructs a random word generator
        /// </summary>
        /// <param name="randomSyllabileGenerator"></param>
        /// <param name="minWordLength"></param>
        /// <param name="maxWordLength"></param>
        public RandomWordGenerator(RandomSyllabileGenerator randomSyllabileGenerator, int minWordLength = 3, int maxWordLength = 10)
        {
            if (maxWordLength < minWordLength)
            {
                throw new ArgumentOutOfRangeException("maxWordLength", "The param max word lenght cannot be smaller than min word length");
            }

            _minWordLength = minWordLength;
            _maxWordLength = maxWordLength;

            _randomSyllabileGenerator = randomSyllabileGenerator;
        }