internal HttpResponse(HttpRequest req, HttpListenerContext ctx, WatsonWebserverSettings settings, WatsonWebserverEvents events) { if (req == null) { throw new ArgumentNullException(nameof(req)); } if (ctx == null) { throw new ArgumentNullException(nameof(ctx)); } if (settings == null) { throw new ArgumentNullException(nameof(settings)); } if (events == null) { throw new ArgumentNullException(nameof(events)); } _Request = req; _Context = ctx; _Response = _Context.Response; _Settings = settings; _Events = events; _OutputStream = _Response.OutputStream; }
internal HttpContext(HttpListenerContext ctx, WatsonWebserverSettings settings, WatsonWebserverEvents events) { if (ctx == null) { throw new ArgumentNullException(nameof(ctx)); } if (events == null) { throw new ArgumentNullException(nameof(events)); } _Context = ctx; Request = new HttpRequest(ctx); Response = new HttpResponse(Request, _Context, settings, events); }