Esempio n. 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IApplicationLifetime lifeTime)
        {
            loggerFactory.AddConsole();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            var producer = new BlasterProducer(new QueueOptions
            {
                BaseLocation      = @"C:\Temp",
                CancellationToken = lifeTime.ApplicationStopping
            });

            _blasterServer = new BlasterWebServer(producer);

            app.Run(async(context) =>
            {
                await _blasterServer.Handle(context);
            });
        }
Esempio n. 2
0
 public BlasterWebServer(BlasterProducer producer)
 {
     _producer = producer;
 }