Merge pull request #11630 from cjaliaga/template-blank-lines

[Addresses #11619] Remove blank lines in Configure Services for Razor and Mvc
This commit is contained in:
Ryan Brandenburg 2019-07-01 14:30:29 -07:00 committed by GitHub
commit b2023bbbf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -52,7 +52,6 @@ namespace Company.WebApplication1
// This method gets called by the runtime. Use this method to add services to the container. // This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
#if (IndividualLocalAuth) #if (IndividualLocalAuth)
services.AddDbContext<ApplicationDbContext>(options => services.AddDbContext<ApplicationDbContext>(options =>
#if (UseLocalDB) #if (UseLocalDB)
@ -108,8 +107,8 @@ namespace Company.WebApplication1
services.AddAuthentication(AzureADB2CDefaults.AuthenticationScheme) services.AddAuthentication(AzureADB2CDefaults.AuthenticationScheme)
.AddAzureADB2C(options => Configuration.Bind("AzureAdB2C", options)); .AddAzureADB2C(options => Configuration.Bind("AzureAdB2C", options));
#endif #endif
#if (OrganizationalAuth) #if (OrganizationalAuth)
services.AddRazorPages().AddMvcOptions(options => services.AddRazorPages().AddMvcOptions(options =>
{ {
var policy = new AuthorizationPolicyBuilder() var policy = new AuthorizationPolicyBuilder()

View File

@ -52,7 +52,6 @@ namespace Company.WebApplication1
// This method gets called by the runtime. Use this method to add services to the container. // This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
#if (IndividualLocalAuth) #if (IndividualLocalAuth)
services.AddDbContext<ApplicationDbContext>(options => services.AddDbContext<ApplicationDbContext>(options =>
#if (UseLocalDB) #if (UseLocalDB)
@ -108,8 +107,8 @@ namespace Company.WebApplication1
services.AddAuthentication(AzureADB2CDefaults.AuthenticationScheme) services.AddAuthentication(AzureADB2CDefaults.AuthenticationScheme)
.AddAzureADB2C(options => Configuration.Bind("AzureAdB2C", options)); .AddAzureADB2C(options => Configuration.Bind("AzureAdB2C", options));
#endif #endif
#if (OrganizationalAuth) #if (OrganizationalAuth)
services.AddControllersWithViews(options => services.AddControllersWithViews(options =>
{ {
var policy = new AuthorizationPolicyBuilder() var policy = new AuthorizationPolicyBuilder()