コード例 #1
0
ファイル: DebugMiddleware.cs プロジェクト: slishnevsky/Demos
        public async Task Invoke(IDictionary <string, object> environment)
        {
            var ctx = new OwinContext(environment);

            _options.OnIncomingRequest(ctx);
            await _next(environment);

            _options.OnOutgoingRequest(ctx);
        }
コード例 #2
0
        /// <summary>
        /// Takes care of invoking the middleware
        /// </summary>
        /// <param name="environment">environment</param>
        /// <returns>Task</returns>
        public async Task Invoke(IDictionary <string, object> environment)
        {
            var ctx = new OwinContext(environment);

            //or use: var path = (string)environment["owin.RequestPath"];

            _options.OnIncomingRequest(ctx);
            await _next(environment);

            _options.OnOutgoingRequest(ctx);
        }