Ejemplo n.º 1
0
 public CameraController(IAIService aiService, ISynologyService synologyService, ILogger <CameraController> logger, ILogger <ISnapshotManager> snapshotManagerLogger)
 {
     _aiService             = aiService;
     _synologyService       = synologyService;
     _logger                = logger;
     _snapshotManagerLogger = snapshotManagerLogger;
 }
Ejemplo n.º 2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IConfiguration configuration, ILogger <Startup> logger, ISynologyService synologyService)
        {
            Config.Generate(logger, configuration);

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseSwagger();
                app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "SynoAI v1"));
            }

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });

            Task task = synologyService.InitialiseAsync();

            task.Wait();
        }