Exemple #1
0
        private HttpStatusCode GetQueue(HttpListenerContext context)
        {
            var webQData = _queue.Peek();

            if (webQData != null)
            {
                return(ConDepReturnCodes.Found(context, webQData));
            }
            return(HttpStatusCode.NotFound);
        }
Exemple #2
0
        private HttpStatusCode GetItem(string environment, string id, HttpListenerContext context)
        {
            var item = _queue.Peek(environment, id);

            if (item != null)
            {
                return(ConDepReturnCodes.Found(context, item));
            }
            return(HttpStatusCode.NotFound);
        }
Exemple #3
0
        private HttpStatusCode GetEnvironmentQueue(string environment, HttpListenerContext context)
        {
            var envQ = _queue.Peek(environment);

            if (envQ == null)
            {
                return(HttpStatusCode.NotFound);
            }
            return(ConDepReturnCodes.Found(context, envQ));
        }
Exemple #4
0
        private HttpStatusCode TagAsStarted(string environment, string id, HttpListenerContext context)
        {
            var item = _queue.Poke(environment, id);

            if (item != null)
            {
                return(ConDepReturnCodes.Created(context, item));
            }
            return(HttpStatusCode.NotFound);
        }
Exemple #5
0
        private HttpStatusCode AddToQueue(string environment, HttpListenerContext context)
        {
            var item = _queue.Enqueue(environment);

            return(ConDepReturnCodes.Created(context, item));
        }