private double GetRandomTime(TimeComponent thisTimeComponent) { double result = 0; switch (thisTimeComponent) { case TimeComponent.hours: result = ImSoRandom.Next(0, 24); break; case TimeComponent.minutes: result = ImSoRandom.Next(0, 60); break; case TimeComponent.seconds: result = ImSoRandom.Next(0, 60); break; case TimeComponent.milliseconds: result = ImSoRandom.Next(0, 1000); break; default: break; } return(result); }
public object SelectData() { if (ImSoRandom.Next(0, 2) == 0) { return(false); } else { return(true); } }
public object SelectData() { TimeSpan timeSpan = Upper.Subtract(Lower); DateTime result = Lower.AddDays(ImSoRandom.Next(0, timeSpan.Days + 1)); result = result.AddHours(GetRandomTime(TimeComponent.hours)); result = result.AddMinutes(GetRandomTime(TimeComponent.minutes)); result = result.AddSeconds(GetRandomTime(TimeComponent.seconds)); result = result.AddMilliseconds(GetRandomTime(TimeComponent.milliseconds)); return(result); }
public object SelectData() { return(ImSoRandom.Next(this.Lower, this.Upper)); }
public int SelectRandom(int lower, int upper) { return(ImSoRandom.Next(lower, upper)); }
public object SelectData() { var thisNumber = ImSoRandom.Next(0, Set.Count()); return(Set.ElementAt(thisNumber)); }
public object SelectData() { return(ImSoRandom.Next(int.MinValue, int.MaxValue)); }
public object SelectData() { return(Strings.ElementAt(ImSoRandom.Next(0, Strings.Count()))); }