示例#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,
            IRTPIServiceFactory rtpiFactory,
            IHttpRequestService httpRequestService
            )
        {
            loggerFactory.AddConsole();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                loggerFactory.AddDebug(LogLevel.Information);
            }
            else
            {
                loggerFactory.AddDebug(LogLevel.Error);
            }

            app.UseMvc();

            rtpiFactory.RegisterRTPIService("LUAS", new LUASRTPIService(httpRequestService));
            rtpiFactory.RegisterRTPIService("DublinBus", new DublinBusRTPIService(httpRequestService));
        }
示例#2
0
 public RTPIApiController(IRTPIServiceFactory serviceFactory)
 {
     _RTPIServiceFactory = serviceFactory;
 }