示例#1
0
        public void AddComponent(Func<IDictionary<string, object>, Task> handler, OwinPipelineStage stage)
        {
            Contract.Ensures(handler != null);

            _handlers.Add(new Middleware()
            {
                Handler = handler,
                Stage = stage
            });
        }
示例#2
0
        public void AddComponent(Func<IOwinContext, Task> handler, OwinPipelineStage stage = OwinPipelineStage.PreHandlerExecute)
        {
            Contract.Ensures(handler != null);

            _handlers.Add(new Middleware()
            {
                Handler = handler,
                Stage = stage
            });
        }