public FantasyName GetFantasyName() { FantasyName name = new FantasyName(); name.Gender = Gender; if (PrefixGenerator != null) { name.Prefix = PrefixGenerator.GetName(); } if (FirstNameGenerator != null) { name.FirstName = FirstNameGenerator.GetName(); } if (LastNameGenerator != null) { name.LastName = LastNameGenerator.GetName(); } if (PostfixNameGenerator != null) { name.Postfix = PostfixNameGenerator.GetName(); } return(name); }
private static IEnumerable <string> GeneratePrefixInformation(PrefixGenerator prefixGenerator) { var prefixes = prefixGenerator.GetPrefixes().ToArray(); // if no prefixes, return an empty prefix to get everything if (!prefixes.Any()) { return new[] { string.Empty } } ; return(prefixes); }