Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SystemHttpRequest"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public SystemHttpRequest(System.Net.HttpListenerContext context)
 {
     _request = context.Request;
     Enum.TryParse <HttpVerbs>(_request.HttpMethod.Trim(), true, out var verb);
     HttpVerb       = verb;
     Cookies        = new SystemCookieCollection(_request.Cookies);
     LocalEndPoint  = _request.LocalEndPoint;
     RemoteEndPoint = _request.RemoteEndPoint;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SystemHttpResponse"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public SystemHttpResponse(System.Net.HttpListenerContext context)
 {
     _response = context.Response;
     Cookies   = new SystemCookieCollection(_response.Cookies);
 }