Example #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, IPokemonDataService pokemonDataService)
        {
            app.UseDeveloperExceptionPage();
            app.UseMvc();
            app.UseSwagger();
            var rabbitHelper = new RabbitResponseHandler.RabbitResponseHandler(pokemonDataService);

            rabbitHelper.InitiateListener();
            app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Pokemon Data API"); });
        }
 public RabbitResponseHandler(IPokemonDataService pokemonDataService)
 {
     _pokemonDataService = pokemonDataService;
     _bus = RabbitHutch.CreateBus("host=172.18.0.2");
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PokemonController"/> class.
 /// </summary>
 /// <param name="pokemonDataService">An instance of <see cref="PokemonDataService"/>.</param>
 public PokemonController(
     IPokemonDataService pokemonDataService)
 {
     this.pokemonDataService = pokemonDataService;
 }
Example #4
0
 public PokedexController(IPokemonDataService pokemonData, ICSVReader csvReader)
 {
     _pokemonData = pokemonData;
     _csvReader   = csvReader;
 }