Esempio n. 1
0
 public void Add(HttpHeader header)
 {
     CoreValidator.ThrowIfNull(header, nameof(header));
     this.headers.Add(header.Key, header);
 }
Esempio n. 2
0
        public HttpContext(IHttpRequest requestString)
        {
            CoreValidator.ThrowIfNull(requestString, nameof(requestString));

            request = requestString;
        }
Esempio n. 3
0
 public void AddCookie(HttpCookie cookie)
 {
     CoreValidator.ThrowIfNull(cookie, nameof(cookie));
     this.Cookies.AddCookie(cookie);
 }
 public HttpHeader GetHeader(string key)
 {
     CoreValidator.ThrowIfNull(key, nameof(key));
     return(this.headers.GetValueOrDefault(key, null));
 }
Esempio n. 5
0
        public RequestHandler(Func <IHttpRequest, IHttpResponse> handlingFunc)
        {
            CoreValidator.ThrowIfNull(handlingFunc, nameof(handlingFunc));

            this.handlingFunc = handlingFunc;
        }
        public bool ContainsKey(string key)
        {
            CoreValidator.ThrowIfNull(key, nameof(key));

            return(this.cookies.ContainsKey(key));
        }
Esempio n. 7
0
        public RequestHandler(Func <IHttpRequest, IHttpResponse> func)
        {
            CoreValidator.ThrowIfNull(func, nameof(func));

            this.func = func;
        }
Esempio n. 8
0
 public void AddParameter(string name, object parameter)
 {
     CoreValidator.ThrowIfNullOrEmpty(name, nameof(name));
     CoreValidator.ThrowIfNull(parameter, nameof(parameter));
     this.sessionParameters.Add(name, parameter);
 }
Esempio n. 9
0
 public Func <IHttpRequest, IHttpResponse> Get(HttpRequestMethod method, string path)
 {
     CoreValidator.ThrowIfNull(method, nameof(method));
     CoreValidator.ThrowIfNullOrEmpty(path, nameof(path));
     return(this.routingTable[method][path]);
 }
Esempio n. 10
0
 public void AddParametar(string name, object parametar)
 {
     CoreValidator.ThrowIfNullOrEmpty(name, nameof(name));
     CoreValidator.ThrowIfNull(parametar, nameof(parametar));
     this.sessionParametars[name] = parametar;
 }
 protected RequestHandler(Func <IHttpContext, IHttpResponse> handlingFunc)
 {
     CoreValidator.ThrowIfNull(handlingFunc, nameof(handlingFunc));
     this.handlingFunc = handlingFunc;
 }
Esempio n. 12
0
 public HttpCookie GetCookie(string key)
 {
     CoreValidator.ThrowIfNull(key, nameof(key));
     return(this.cookies.FirstOrDefault(c => c.Key == key).Value);
 }
        public HttpContext(string requestStr)
        {
            CoreValidator.ThrowIfNull(requestStr, nameof(requestStr));

            this.request = new HttpRequest(requestStr);
        }
 public void Add(IHttpCookie cookie)
 {
     CoreValidator.ThrowIfNull(cookie, nameof(cookie.Key));
     this.cookies.Add(cookie.Key, cookie);
 }
        public HttpContext(IHttpRequest httpRequest)
        {
            CoreValidator.ThrowIfNull(httpRequest, nameof(httpRequest));

            this.httpRequest = httpRequest;
        }
Esempio n. 16
0
 public HttpSession(string id)
 {
     CoreValidator.ThrowIfNull(id, nameof(id));
     this.Id = id;
     this.sessionParameters = new Dictionary <string, object>();
 }
Esempio n. 17
0
        public bool ContainsKey(string key)
        {
            CoreValidator.ThrowIfNull(key, nameof(key));

            return(this.headers.Any(h => h.Key == key));
        }
        public void Add(HttpCookie httpCookie)
        {
            CoreValidator.ThrowIfNull(httpCookie, nameof(httpCookie));

            this.httpCookies[httpCookie.Key] = httpCookie;
        }
 public void Add(HttpHeader header)
 {
     CoreValidator.ThrowIfNull(header, nameof(header));
     headers[header.Key] = header;
 }
Esempio n. 20
0
        public HttpHandler(IServerRouteConfig routeConfig)
        {
            CoreValidator.ThrowIfNull(routeConfig, nameof(routeConfig));

            this.serverRouteConfig = routeConfig;
        }
Esempio n. 21
0
        public void AddCookie(HttpCookie cookie)
        {
            CoreValidator.ThrowIfNull(httpCookies, nameof(cookie));

            this.httpCookies.Add(cookie.Key, cookie);
        }
Esempio n. 22
0
 public HttpResponse(HttpResponseStatusCode statusCode) : this()
 {
     CoreValidator.ThrowIfNull(statusCode, nameof(statusCode));
     this.StatusCode = statusCode;
 }
Esempio n. 23
0
        public void AddCookie(HttpCookie cookie)
        {
            CoreValidator.ThrowIfNull(cookie, nameof(cookie));

            this.CookieColection.Add(cookie.Key, cookie);
        }
Esempio n. 24
0
 public void AddHeader(HttpHeader header)
 {
     CoreValidator.ThrowIfNull(header, nameof(header));
     this.Headers.AddHeader(header);
 }
        public HttpContext(IHttpRequest request)
        {
            CoreValidator.ThrowIfNull(request, nameof(request));

            this.request = request;
        }
Esempio n. 26
0
        public void Add(HttpCookie cookie)
        {
            CoreValidator.ThrowIfNull(cookie, nameof(cookie));

            this.cookies[cookie.Key] = cookie;
        }
 public HttpCookie GetCookie(string key)
 {
     CoreValidator.ThrowIfNull(key, nameof(key));
     return(this.cookies.GetValueOrDefault(key, null));
 }
Esempio n. 28
0
 public bool ContainsHeader(string key)
 {
     CoreValidator.ThrowIfNull(key, nameof(key));
     return(this.headers.ContainsKey(key));
 }
Esempio n. 29
0
 public RequestHandler(Func <IHttpRequest, IHttpResponse> f)
 {
     CoreValidator.ThrowIfNull(f, nameof(f));
     _f = f;
 }