예제 #1
0
        public DebugMiddleware(AppFunc next, DebugMiddlewareOptions options)
        {
            _next    = next;
            _options = options;

            if (_options.OnIncomingRequest == null)
            {
                _options.OnIncomingRequest = (ctnx) => { Debug.WriteLine("Incoming request: " + ctnx.Request.Path); };
            }

            if (_options.OnOutgoingRequest == null)
            {
                _options.OnOutgoingRequest = (ctnx) => { Debug.WriteLine("Outgoing request: " + ctnx.Request.Path); };
            }
        }
예제 #2
0
 public DebugMiddleware(AppFun next, DebugMiddlewareOptions options)
 {
     _next    = next;
     _options = options;
 }