Esempio n. 1
0
        public LaunchPadController(ILaunchPadService launchPadService,
                                   ILogger <LaunchPadController> logger,
                                   IConfiguration config)
        {
            _launchPadService = launchPadService;
            _logger           = logger;

            _baseUri = config.GetValue <string>("SpaceX:BaseUri");
        }
Esempio n. 2
0
 public LaunchPadsController(IOptions <AppSettings> appSettings,
                             ILogger <LaunchPadsController> log,
                             ILaunchPadService launch,
                             ILaunchPadManager manager)
 {
     _appSettings = appSettings.Value;
     _log         = log;
     _launch      = launch;
     _manager     = manager;
 }
Esempio n. 3
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,
                              ILaunchPadService launch)
        {
            //creates logger.
            loggerFactory.AddSerilog();

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

            app.UseHttpsRedirection();
            app.UseMvc();
        }
 public void Setup()
 {
     fakeRepo = A.Fake <ISpaceXRepository>();
     _service = new LaunchpadService(fakeRepo);
 }
Esempio n. 5
0
 public LaunchPadManager(IOptions <AppSettings> appSettings, ILogger <LaunchPadManager> log, ILaunchPadService launch)
 {
     _appSettings = appSettings.Value;
     _log         = log;
     _launch      = launch;
 }
Esempio n. 6
0
 public LaunchpadAPIController(ILaunchPadService launchPadService)
 {
     _launchPadService = launchPadService;
 }