Ejemplo n.º 1
0
        public SelfHostServiceArguments(RouteData routeData, HttpRequestMessage request, HttpResponseMessage response)
        {
            With(request);
            With(response);

            With<IRequestData>(new SelfHostRequestData(routeData, request));
            With<ICurrentHttpRequest>(new SelfHostCurrentHttpRequest(request));
            With<IStreamingData>(new SelfHostStreamingData(request));
            _writer = new SelfHostHttpWriter(response);
            With<IHttpWriter>(_writer);
            With<IClientConnectivity>(new SelfHostClientConnectivity());
            With<ICookies>(new SelfHostCookies(request, response));
            With<IResponse>(new SelfHostResponse(response));
        }
Ejemplo n.º 2
0
        public SelfHostServiceArguments(RouteData routeData, HttpRequestMessage request, HttpResponseMessage response)
        {
            With(request);
            With(response);

            With <IRequestData>(new SelfHostRequestData(routeData, request));
            With <ICurrentHttpRequest>(new SelfHostCurrentHttpRequest(request));
            With <IStreamingData>(new SelfHostStreamingData(request));
            _writer = new SelfHostHttpWriter(response);
            With <IHttpWriter>(_writer);
            With <IClientConnectivity>(new SelfHostClientConnectivity());
            With <ICookies>(new SelfHostCookies(request, response));
            With <IResponse>(new SelfHostResponse(response));
        }