예제 #1
0
        /// <summary>
        /// 执行中间件
        /// </summary>
        public async Task Invoke(HttpContext context)
        {
            OwinContextReader.SetOwinContext(context);

            await this._next.Invoke(context);

            OwinContextReader.ClearOwinContext();
        }
        /// <summary>
        /// 执行中间件
        /// </summary>
        public override async Task Invoke(IOwinContext context)
        {
            OwinContextReader.SetOwinContext(context);

            await base.Next.Invoke(context);

            OwinContextReader.ClearOwinContext();
        }
예제 #3
0
        public override async Task Invoke(IOwinContext owinContext)
        {
            var reader    = new OwinContextReader(owinContext);
            var responder = new OwinContextResponder(owinContext);
            var context   = new OwinRequestContext(owinContext);

            await _invoker.InvokeAsync(reader, responder, context);

            //await Next.Invoke(owinContext);
        }