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