Example #1
0
 internal God()
 {
     creators.Add(() => new Student(NamesHelper.RandomName(Gender.Male)));
     creators.Add(() => new Botan(NamesHelper.RandomName(Gender.Male)));
     creators.Add(() => new Girl(NamesHelper.RandomName(Gender.Female)));
     creators.Add(() => new PrettyGirl(NamesHelper.RandomName(Gender.Female)));
     creators.Add(() => new SmartGirl(NamesHelper.RandomName(Gender.Female)));
 }
Example #2
0
        private void SetPatronymicIfExists(IHasName target, Human first, Human second)
        {
            var patronymicProperty = target.GetType().GetProperties(System.Reflection.BindingFlags.NonPublic |
                                                                    System.Reflection.BindingFlags.NonPublic |
                                                                    System.Reflection.BindingFlags.Instance).FirstOrDefault(x => x.Name == PatronymicPropertyName);

            if (patronymicProperty != null)
            {
                var s = NamesHelper.GeneratePatronimyc((first.Gender == Gender.Male ? first : second).Name, Gender.Female);
                patronymicProperty.SetValue(target, s);
            }
        }
Example #3
0
 internal string RandomChildName()
 {
     return(NamesHelper.RandomName(Gender.Female));
 }