Example #1
0
        public virtual string GetName(string firstName, string lastName)
        {
            if (string.IsNullOrEmpty(firstName))
            {
                firstName = this.GetFirstName();
            }
            if (string.IsNullOrEmpty(lastName))
            {
                lastName = this.GetLastName();
            }
            var defaultFormat = locale.NameFormat[0];

            if (factory.GetProbablyFromFormat(ref defaultFormat))
            {
                return(factory.Next <string>(removeNameFormat(firstName, lastName, defaultFormat)));
            }
            return(factory.Next <string>(removeNameFormat(firstName, lastName, Selector.GetRandomItemFromList
                                                              (locale.NameFormat))));;
        }