Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public object SelectData()
 {
     if (ImSoRandom.Next(0, 2) == 0)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public object SelectData()
 {
     return(ImSoRandom.Next(this.Lower, this.Upper));
 }
Ejemplo n.º 5
0
 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));
        }
Ejemplo n.º 7
0
 public object SelectData()
 {
     return(ImSoRandom.Next(int.MinValue, int.MaxValue));
 }
 public object SelectData()
 {
     return(Strings.ElementAt(ImSoRandom.Next(0, Strings.Count())));
 }