Ejemplo n.º 1
0
        // ReSharper disable once UnusedMember.Global
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, HttpServerService httpServerService)
        {
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }
            if (env == null)
            {
                throw new ArgumentNullException(nameof(env));
            }
            if (httpServerService == null)
            {
                throw new ArgumentNullException(nameof(httpServerService));
            }

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

            ConfigureSwagger(app);
            ConfigureWebApps(app);
            ConfigureMvc(app);

            app.Run(httpServerService.HandleRequestAsync);
        }
Ejemplo n.º 2
0
        // ReSharper disable once UnusedMember.Global
        public void Configure(
            IApplicationBuilder app,
            IHostingEnvironment env,
            HttpServerService httpServerService,
            LogService logService,
            ILoggerFactory loggerFactory,
            IServiceProvider serviceProvider,
            GlobalVariablesService globalVariablesService,
            PackageManagerService packageManagerService)
        {
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }
            if (env == null)
            {
                throw new ArgumentNullException(nameof(env));
            }
            if (httpServerService == null)
            {
                throw new ArgumentNullException(nameof(httpServerService));
            }
            if (logService == null)
            {
                throw new ArgumentNullException(nameof(logService));
            }
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            loggerFactory.AddProvider(new LogServiceLoggerProvider(logService));

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

            app.UseResponseCompression();
            app.UseCors(p => p.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod());

            ConfigureSwagger(app);
            ConfigureWebApps(app, globalVariablesService, packageManagerService);
            ConfigureMvc(app);

            app.Run(httpServerService.HandleRequestAsync);

            StartServices(serviceProvider);
        }
Ejemplo n.º 3
0
        // ReSharper disable once UnusedMember.Global
        public void Configure(
            IApplicationBuilder app,
            IHostingEnvironment env,
            HttpServerService httpServerService,
            LogService logService,
            ILoggerFactory loggerFactory,
            IServiceProvider serviceProvider)
        {
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }
            if (env == null)
            {
                throw new ArgumentNullException(nameof(env));
            }
            if (httpServerService == null)
            {
                throw new ArgumentNullException(nameof(httpServerService));
            }
            if (logService == null)
            {
                throw new ArgumentNullException(nameof(logService));
            }
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            loggerFactory.AddProvider(new LogServiceLoggerProvider(logService));

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

            ConfigureSwagger(app);
            ConfigureWebApps(app);
            ConfigureMvc(app);

            app.Run(httpServerService.HandleRequestAsync);

            StartServices(serviceProvider);
        }
Ejemplo n.º 4
0
 public HttpServerPythonProxy(HttpServerService httpServerService)
 {
     _httpServerService = httpServerService ?? throw new ArgumentNullException(nameof(httpServerService));
 }