Exemplo n.º 1
0
        internal OwinHttpListenerContext(RequestContext requestContext,
                                         string basePath, string path, string query, DisconnectHandler disconnectHandler)
        {
            _requestContext    = requestContext;
            _environment       = new CallEnvironment(this);
            _owinRequest       = new OwinHttpListenerRequest(_requestContext.Request, basePath, path, query, _environment);
            _owinResponse      = new OwinHttpListenerResponse(_requestContext, _environment);
            _disconnectHandler = disconnectHandler;

            _environment.OwinVersion = Constants.OwinVersion;

            SetServerUser(_requestContext.User);
            _environment.RequestContext = _requestContext;
        }
        private static void OnResponseBodyStarted(object state)
        {
            OwinHttpListenerResponse thisPtr = (OwinHttpListenerResponse)state;

            thisPtr.ResponseBodyStarted();
        }