public void Add(HttpHeader header) { CoreValidator.ThrowIfNull(header, nameof(header)); this.headers.Add(header.Key, header); }
public HttpContext(IHttpRequest requestString) { CoreValidator.ThrowIfNull(requestString, nameof(requestString)); request = requestString; }
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)); }
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)); }
public RequestHandler(Func <IHttpRequest, IHttpResponse> func) { CoreValidator.ThrowIfNull(func, nameof(func)); this.func = func; }
public void AddParameter(string name, object parameter) { CoreValidator.ThrowIfNullOrEmpty(name, nameof(name)); CoreValidator.ThrowIfNull(parameter, nameof(parameter)); this.sessionParameters.Add(name, parameter); }
public Func <IHttpRequest, IHttpResponse> Get(HttpRequestMethod method, string path) { CoreValidator.ThrowIfNull(method, nameof(method)); CoreValidator.ThrowIfNullOrEmpty(path, nameof(path)); return(this.routingTable[method][path]); }
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; }
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; }
public HttpSession(string id) { CoreValidator.ThrowIfNull(id, nameof(id)); this.Id = id; this.sessionParameters = new Dictionary <string, object>(); }
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; }
public HttpHandler(IServerRouteConfig routeConfig) { CoreValidator.ThrowIfNull(routeConfig, nameof(routeConfig)); this.serverRouteConfig = routeConfig; }
public void AddCookie(HttpCookie cookie) { CoreValidator.ThrowIfNull(httpCookies, nameof(cookie)); this.httpCookies.Add(cookie.Key, cookie); }
public HttpResponse(HttpResponseStatusCode statusCode) : this() { CoreValidator.ThrowIfNull(statusCode, nameof(statusCode)); this.StatusCode = statusCode; }
public void AddCookie(HttpCookie cookie) { CoreValidator.ThrowIfNull(cookie, nameof(cookie)); this.CookieColection.Add(cookie.Key, cookie); }
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; }
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)); }
public bool ContainsHeader(string key) { CoreValidator.ThrowIfNull(key, nameof(key)); return(this.headers.ContainsKey(key)); }
public RequestHandler(Func <IHttpRequest, IHttpResponse> f) { CoreValidator.ThrowIfNull(f, nameof(f)); _f = f; }