/// <summary>
 /// Selects a name at random from a bank.
 /// </summary>
 /// <param name="rnd"></param>
 /// <returns></returns>
 private string PickANameForSingleRecord(Random rnd)
 {
     if (rnd != null)
     {
         var ng = new NamePicker();
         return(ng.PickAName(rnd));
     }
     else
     {
         throw new NullReferenceException();
     }
 }
Beispiel #2
0
        public override BaseBuilder <Character> WithRandomizedDefaults(TRandom randomizer)
        {
            Entity = new Character();

            var namePicker = new NamePicker(randomizer);
            var gender     = (Gender)(randomizer.Next(2) + 1);

            Entity.Gender          = gender;
            Entity.FirstName       = namePicker.GetFirstName(gender);
            Entity.LastName        = namePicker.GetLastName();
            Entity.DateOfBirth     = new RandomDateGenerator().GetRandomDate(new DateTime(1980, 1, 1), new DateTime(2019, 1, 1), randomizer);
            Entity.DateSimulatedTo = Entity.DateOfBirth;
            Entity.LifeLogs.Add(LifeLogFactories.BuildLog_Birth(Entity));

            return(this);
        }
Beispiel #3
0
 /// <summary>
 /// Homes the button clicked.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 private void HomeButtonClicked(object sender, EventArgs e)
 {
     NamePicker.Clear();
     landingPageViewModel.GetUserAverageData("Total");
 }