2017-10-08 22:23:17 +02:00
|
|
|
|
using System;
|
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
2017-10-09 19:35:07 +02:00
|
|
|
|
namespace Bit.Icons
|
2017-10-08 22:23:17 +02:00
|
|
|
|
{
|
|
|
|
|
public class Startup
|
|
|
|
|
{
|
|
|
|
|
public Startup(IConfiguration configuration)
|
|
|
|
|
{
|
|
|
|
|
Configuration = configuration;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IConfiguration Configuration { get; }
|
|
|
|
|
|
|
|
|
|
public void ConfigureServices(IServiceCollection services)
|
|
|
|
|
{
|
2017-10-09 20:02:57 +02:00
|
|
|
|
services.AddOptions();
|
|
|
|
|
services.Configure<IconsSettings>(Configuration.GetSection("IconsSettings"));
|
2017-10-09 18:58:59 +02:00
|
|
|
|
services.AddMemoryCache();
|
2017-10-08 22:23:17 +02:00
|
|
|
|
services.AddMvc();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
|
|
|
|
{
|
2017-10-09 19:35:07 +02:00
|
|
|
|
if(env.IsDevelopment())
|
2017-10-08 22:23:17 +02:00
|
|
|
|
{
|
|
|
|
|
app.UseDeveloperExceptionPage();
|
|
|
|
|
}
|
2017-10-09 20:05:35 +02:00
|
|
|
|
|
2017-10-08 22:23:17 +02:00
|
|
|
|
app.UseMvc();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|