summaryrefslogtreecommitdiff
path: root/Dewdrop/Startup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Dewdrop/Startup.cs')
-rw-r--r--Dewdrop/Startup.cs39
1 files changed, 24 insertions, 15 deletions
diff --git a/Dewdrop/Startup.cs b/Dewdrop/Startup.cs
index 00c18bab..d1618037 100644
--- a/Dewdrop/Startup.cs
+++ b/Dewdrop/Startup.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@@ -10,33 +6,46 @@ using Microsoft.Extensions.Logging;
namespace Dewdrop
{
+ /// <summary>The web app startup configuration.</summary>
public class Startup
{
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The web app configuration.</summary>
+ public IConfigurationRoot Configuration { get; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="env">The hosting environment.</param>
public Startup(IHostingEnvironment env)
{
- var builder = new ConfigurationBuilder()
+ this.Configuration = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
- .AddEnvironmentVariables();
- Configuration = builder.Build();
+ .AddEnvironmentVariables()
+ .Build();
}
- public IConfigurationRoot Configuration { get; }
-
- // This method gets called by the runtime. Use this method to add services to the container.
+ /// <summary>The method called by the runtime to add services to the container.</summary>
+ /// <param name="services">The service injection container.</param>
public void ConfigureServices(IServiceCollection services)
{
- // Add framework services.
services.AddMvc();
}
- // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ /// <summary>The method called by the runtime to configure the HTTP request pipeline.</summary>
+ /// <param name="app">The application builder.</param>
+ /// <param name="env">The hosting environment.</param>
+ /// <param name="loggerFactory">The logger factory.</param>
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
- loggerFactory.AddConsole(Configuration.GetSection("Logging"));
+ loggerFactory.AddConsole(this.Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
-
app.UseMvc();
}
}