Example #1
0
        public NameGenerator(SyllableProvider provider, NameMutator mutator, NameValidator validator)
        {
            this.UsingProvider(provider)
            .UsingMutator(mutator)
            .UsingValidator(validator)
            .LimitSyllableCount(2, 2)
            .LimitRetries(1000);

            this.Random = new Random();
        }
Example #2
0
 public NameGenerator(SyllableProvider provider, NameValidator validator) : this(provider, new DefaultNameMutator(), validator)
 {
 }
Example #3
0
 public NameGenerator(SyllableProvider provider) : this(provider, new DefaultNameMutator(), null)
 {
 }
Example #4
0
 public NameGenerator(SyllableProvider provider, NameMutator mutator) : this(provider, mutator, null)
 {
 }
Example #5
0
 /// <summary>
 /// Sets the specified ISyllableProvider as the new syllable provider for this NameGenerator.
 /// The old ISyllableProvider is replaced if one was previously defined.
 /// </summary>
 public NameGenerator UsingProvider(SyllableProvider provider)
 {
     this.Provider = provider ?? throw new ArgumentNullException("The specified ISyllableProvider is null.");
     return(this);
 }