Exemplo n.º 1
0
        private HttpResponseMessage GetFromMs()
        {
            int ms = DateTime.Now.Millisecond;

            if (ms >= KnownResponses.SplunkRepsonses.Length && ms > 99)
            {
                ms -= (int)Math.Round((double)ms, -2);
            }

            if (ms >= KnownResponses.SplunkRepsonses.Length)
            {
                ms -= (int)Math.Round((double)ms, -1);
            }

            return(KnownResponses.GetHttpResponseMessageForCode(ms));
        }
Exemplo n.º 2
0
        private HttpResponseMessage GetRandom()
        {
            var rnd = new Random();

            return(KnownResponses.GetHttpResponseMessageForCode(rnd.Next(1, KnownResponses.SplunkRepsonses.Length)));
        }