Ejemplo n.º 1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public async void ConfigureServices(IServiceCollection services)
        {
            services.AddCors(o => o.AddPolicy("MyPolicy", builder =>
            {
                builder.AllowAnyOrigin()
                .AllowAnyMethod()
                .AllowAnyHeader();
            }));

            services.AddControllers().AddNewtonsoftJson();

            WebsocketService     websocket    = new WebsocketService();
            DatabaseService      database     = new DatabaseService();
            AVLProcessingService syncromatics = new AVLProcessingService(database, websocket);

            services.AddSingleton(syncromatics);
            services.AddSingleton(database);
        }
Ejemplo n.º 2
0
 public RouteController(AVLProcessingService service)
 {
     Service = service;
 }