Beispiel #1
0
        // ReSharper disable once UnusedMember.Global
        public void Configure(
            IApplicationBuilder app,
            IHostingEnvironment env,
            AuthorizationService authorizationService,
            ConnectorService connectorService,
            StaticFilesService staticFilesService)
        {
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }
            if (env == null)
            {
                throw new ArgumentNullException(nameof(env));
            }
            if (authorizationService == null)
            {
                throw new ArgumentNullException(nameof(authorizationService));
            }
            if (connectorService == null)
            {
                throw new ArgumentNullException(nameof(connectorService));
            }
            if (staticFilesService == null)
            {
                throw new ArgumentNullException(nameof(staticFilesService));
            }

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

            ConfigureMvc(app);
            ConfigureSwagger(app);
            ConfigureConnector(app, connectorService, authorizationService);

            app.Run(async context =>
            {
                if (await staticFilesService.HandleRequestAsync(context))
                {
                    return;
                }

                await connectorService.ForwardHttpRequestAsync(context);
            });
        }
Beispiel #2
0
 public PCController(ClientMenusService clientMenusService, StaticFilesService staticFilesService)
 {
     _clientMenusService = clientMenusService;
     _staticFilesService = staticFilesService;
 }
Beispiel #3
0
 public SlideController(StaticFilesService staticFilesService)
 {
     _staticFilesService = staticFilesService;
 }