Пример #1
0
        public static void Configuration(IAppBuilder appBuilder)
        {
            var handler = new OwinHandler();

            appBuilder
            .RescheduleCallbacks()
            .Run(Delegates.ToDelegate(handler.ProcessRequest));
        }
Пример #2
0
        public StatsPageMiddleware(OwinHandler next, StatsLogger logger)
        {
            if (logger == null)
            {
                throw new ArgumentNullException("You must provide an IServerLogger");
            }

            Logger = logger;
        }
        public StatsPageMiddleware(OwinHandler next, StatsLogger logger)
        {
            if (next != null)
            {
                throw new ArgumentNullException("This middleware must be the last in the pipeline");
            }
            else if (logger == null)
            {
                throw new ArgumentNullException("You must provide an IServerLogger");
            }

            Logger = logger;
        }
Пример #4
0
        /// <summary>
        /// Starts this FastCgi server! This method only returns when the server is ready to accept connections.
        /// </summary>
        /// <param name="background">True to start the server without blocking, false to block.</param>
        public override void Start(bool background)
        {
            AppBuilder = new FosAppBuilder(OnAppDisposal.Token);

            // Configure the application and build our pipeline entry. This must happen BEFORE BUILDING THE LOGGER
            ApplicationConfigure(AppBuilder);
            OwinPipelineEntry = (OwinHandler)AppBuilder.Build(typeof(OwinHandler));

            // Sets the logger
            var logger = BuildLogger();

            if (logger != null)
            {
                base.SetLogger(logger);
            }

            base.Start(background);
        }
Пример #5
0
        /// <summary>
        /// Starts this FastCgi server! This method only returns when the server is ready to accept connections.
        /// </summary>
        /// <param name="background">True to start the server without blocking, false to block.</param>
        public override void Start(bool background)
        {
            AppBuilder = new FosAppBuilder(OnAppDisposal.Token);

            // Configure the application and build our pipeline entry. This must happen BEFORE BUILDING THE LOGGER
            ApplicationConfigure(AppBuilder);
            OwinPipelineEntry = (OwinHandler)AppBuilder.Build(typeof(OwinHandler));

            // Sets the logger
            var logger = BuildLogger();

            if (logger != null)
            {
                base.SetLogger(logger);
            }

//            // Signs up for important events, then starts the listener
//			FastCgiListener.OnReceiveBeginRequestRecord += OnReceiveBeginRequest;
//			FastCgiListener.OnReceiveParamsRecord += OnReceiveParams;
//			FastCgiListener.OnReceiveStdinRecord += OnReceiveStdin;

            base.Start(background);
        }
Пример #6
0
 public ShuntMiddleware(OwinHandler next, IDictionary <string, IAppBuilder> buildersPaths)
 {
     Next  = next;
     Paths = buildersPaths ?? new Dictionary <string, IAppBuilder>();
 }
Пример #7
0
 public EmptyResponseApplication(OwinHandler ignoreNext)
 {
 }
 public HelloWorldApplication(OwinHandler ignoreNext)
 {
 }
Пример #9
0
 public ThrowsExceptionApplication(OwinHandler ignoreNext)
 {
 }