Example #1
0
        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);
        }
        public FantasyName[] GetFantasyNames(int numNames)
        {
            if (numNames < 0)
            {
                throw new ArgumentException(string.Format("Number of fantasy names cannot be negative. [{0}", numNames));
            }

            FantasyName[] fantasyNames = new FantasyName[numNames];

            for (int i = 0; i < numNames; i++)
            {
                fantasyNames[i] = this.GetFantasyName();
            }

            return(fantasyNames);
        }
        public FantasyName[] GetFantasyNames(int numNames)
        {
            if (numNames < 0)
                throw new ArgumentException(string.Format("Number of fantasy names cannot be negative. [{0}", numNames));

            FantasyName[] fantasyNames = new FantasyName[numNames];

            for (int i = 0; i < numNames; i++)
            {
                fantasyNames[i] = this.GetFantasyName();
            }

            return fantasyNames;
        }
        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();

            if (LandNameGenerator != null)
                name.Land = LandNameGenerator.GetName();

            return name;
        }