예제 #1
0
        public new static Author FillBlanks(Gender gender)
        {
            var p = (Author)Person.FillBlanks(gender);

            p.Patronimic = MaleFirstNames[NewValue.Int(MaleFirstNames.Count)] + (gender == Gender.Female? "овна": "ович");
            return(p);
        }
예제 #2
0
        public static DbAuthor FillBlanks(Gender gender)
        {
            var p = NewPerson.FillBlanks(gender);
            var b = new DbAuthor(p.First, p.Last, p.Patronimic, (eWriterType)NewValue.Int(2));

            All.Add(b);
            return(b);
        }
        public static DbReader FillBlanks(Gender gender)
        {
            var p = NewPerson.FillBlanks(gender);
            var b = new DbReader(p.First, p.Last, p.Patronimic, $"{GroupNames.Random()}-{NewValue.Int(15,18)}-{NewValue.Int(1,3)}")
            {
                AccessLevel = (byte)NewValue.Int(2)
            };

            All.Add(b);
            return(b);
        }
예제 #4
0
        public new static NewPerson FillBlanks(Gender gender)
        {
            var p = Person.FillBlanks(gender);
            var b = new NewPerson()
            {
                First = p.First,
                Last  = p.Last
            };

            if (gender == Gender.Female)
            {
                b.Patronimic = FemalePatronymics[NewValue.Int(FemalePatronymics.Count)];
            }
            else
            {
                b.Patronimic = MalePatronymics[NewValue.Int(MalePatronymics.Count)];
            }

            return(b);
        }
예제 #5
0
        public new static NewPerson FillBlanks(Gender gender)
        {
            var p = new NewPerson();

            switch (gender)
            {
            case Gender.Male:
            {
                p.First      = MaleFirstNames[NewValue.Int(MaleFirstNames.Count)];
                p.Last       = MaleLastNames[NewValue.Int(MaleLastNames.Count)];
                p.Patronimic = MalePatronymics[NewValue.Int(MalePatronymics.Count)];
                break;
            }

            case Gender.Female:
            {
                p.First      = FemaleFirstNames[NewValue.Int(FemaleFirstNames.Count)];
                p.Last       = FemaleLastNames[NewValue.Int(FemaleLastNames.Count)];
                p.Patronimic = FemalePatronymics[NewValue.Int(FemalePatronymics.Count)];
                break;
            }
            }
            return(p);
        }
예제 #6
0
 public static DbAuthor FillBlanks() => FillBlanks((Gender)NewValue.Int(2));
 public static T Random <T>(this IEnumerable <T> o) => o.ElementAt(NewValue.Int(o.Count()));