public object GetParameter(string name) { CoreValidator.ThrowIfNullOrEmpty(name, nameof(name)); return(this.sessionParameters.GetValueOrDefault(name, null)); }
public HttpHandler(IServerRouteConfig routeConfig) { CoreValidator.ThrowIfNull(routeConfig, nameof(routeConfig)); this.serverRouteConfig = routeConfig; }
public HttpResponse(HttpResponseStatusCode statusCode) : this() { CoreValidator.ThrowIfNull(statusCode, nameof(statusCode)); this.StatusCode = statusCode; }
public HttpHeader GetHeader(string key) { CoreValidator.ThrowIfNullOrEmty(key, nameof(key)); return(this.httpHeaders[key]); }
public void AddHeader(HttpHeader header) { CoreValidator.ThrowIfNull(header, nameof(header)); this.Headers.Add(header); }
public void Add(string key, object value) { CoreValidator.ThrowIfNullOrEmpty(key, nameof(key)); CoreValidator.ThrowIfNull(value, nameof(value)); this.values[key] = value; }
public bool ContainsParameter(string parameterName) { CoreValidator.ThrowIfNullOrEmpty(parameterName, nameof(parameterName)); return(this.sessionParameters.ContainsKey(parameterName)); }
public HttpCookie GetCookie(string key) { CoreValidator.ThrowIfNull(key, nameof(key)); return(this.cookies.GetValueOrDefault(key, null)); }
public HttpCookie Cookie(string key) { CoreValidator.ThrowIfNullOrEmpty(key, nameof(key)); return(this.cookies[key]); }
public object GetParameter(string name) { CoreValidator.ThrowIfNullOrEmpty(name, nameof(name)); return(this.sessionParameters[name]); }
public bool ContainsCookie(string key) { CoreValidator.ThrowIfNull(key, nameof(key)); return(this.cookies.ContainsKey(key)); }
public void AddCookie(HttpCookie httpCookie) { CoreValidator.ThrowIfNull(httpCookie, nameof(httpCookie)); this.httpCookies.Add(httpCookie.Key, httpCookie); }
private void ParseRequestUrl(string url) { CoreValidator.ThrowIfNullOrEmpty(url, nameof(url)); this.Url = url; }
public void AddParameter(string name, object parameter) { CoreValidator.ThrowIfNullOrEmpty(name, nameof(name)); CoreValidator.ThrowIfNull(parameter, nameof(parameter)); this.sessionParameters.Add(name, parameter); }
public HttpContext(IHttpRequest request) { CoreValidator.ThrowIfNull(request, nameof(request)); this.request = request; }
public HttpContext(IHttpRequest httpRequest) { CoreValidator.ThrowIfNull(httpRequest, nameof(httpRequest)); this.httpRequest = httpRequest; }
public RequestHandler(Func <IHttpRequest, IHttpResponse> handlingFunc) { CoreValidator.ThrowIfNull(handlingFunc, nameof(handlingFunc)); this.handlingFunc = handlingFunc; }
public void Add(HttpHeader header) { CoreValidator.ThrowIfNull(header, nameof(header)); this.headers[header.Key] = header; }
public bool Containts(string key) { CoreValidator.ThrowIfNullOrEmpty(key, nameof(key)); return(this.values.ContainsKey(key)); }
public HttpHeader GetHeader(string key) { CoreValidator.ThrowIfNull(key, nameof(key)); return(this.headers.FirstOrDefault(h => h.Key == key).Value); }
private readonly IDictionary <string, object> values; //object is info for the session public HttpSession(string id) { CoreValidator.ThrowIfNullOrEmpty(id, nameof(id)); this.Id = id; this.values = new Dictionary <string, object>(); }
protected RequestHandler(Func <IHttpContext, IHttpResponse> handlingFunc) { CoreValidator.ThrowIfNull(handlingFunc, nameof(handlingFunc)); this.handlingFunc = handlingFunc; }
private bool IsValidRequestQueryString(string queryString, string[] queryParameters) { CoreValidator.ThrowIfNullOrEmpty(queryString, nameof(queryString)); return(true); //TODO: REGEX QUERY STRING }
public HttpContext(string requestStr) { CoreValidator.ThrowIfNull(requestStr, nameof(requestStr)); this.request = new HttpRequest(requestStr); }
public void AddCookie(HttpCookie cookie) { CoreValidator.ThrowIfNull(cookie, nameof(cookie)); this.Cookies.Add(cookie); }
public RequestHandler(Func <IHttpRequest, IHttpResponse> func) { CoreValidator.ThrowIfNull(func, nameof(func)); this.func = func; }
public bool ContainsKey(string key) { CoreValidator.ThrowIfNull(key, nameof(key)); return(this.headers.ContainsKey(key)); }
public void Add(string key, string value) { CoreValidator.ThrowIfNull(key, nameof(key)); CoreValidator.ThrowIfNull(value, nameof(value)); this.Add(new HttpCookie(key, value)); }
public void Add(HttpCookie cookie) { CoreValidator.ThrowIfNull(cookie, nameof(cookie)); this.cookies[cookie.Key] = cookie; }
public HttpSession(string id) { CoreValidator.ThrowIfNull(id, nameof(id)); this.Id = id; this.sessionParameters = new Dictionary <string, object>(); }