Example #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();
        }