Esempio n. 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();
        }
Esempio n. 2
0
 public NameGenerator(SyllableProvider provider, NameValidator validator) : this(provider, new DefaultNameMutator(), validator)
 {
 }
Esempio n. 3
0
 public NameGenerator(SyllableProvider provider) : this(provider, new DefaultNameMutator(), null)
 {
 }
Esempio n. 4
0
 public NameGenerator(SyllableProvider provider, NameMutator mutator) : this(provider, mutator, null)
 {
 }
Esempio n. 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);
 }