Skip to content

Commit

Permalink
#41325 Remove calls to IsDevelopment()
Browse files Browse the repository at this point in the history
  • Loading branch information
raamSoftwire authored and jamesgriff committed May 15, 2020
1 parent 4e128db commit a409f79
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion GenderPayGap.Extensions.AspNetCore/Extensions.Services.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static partial class Extensions
public static IServiceCollection AddRedisCache(this IServiceCollection services, string applicationDiscriminator = null)
{
//Add distributed cache service backed by Redis cache
if (Debugger.IsAttached || Config.IsDevelopment() || Config.IsEnvironment("Local"))
if (Debugger.IsAttached || Config.IsEnvironment("Local"))
{
//Use a memory cache
services.AddDistributedMemoryCache();
Expand Down
6 changes: 3 additions & 3 deletions GenderPayGap.IdentityServer4/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
//.AddInMemoryApiResources(Resources.GetApiResources())
.AddCustomUserStore();

if (Debugger.IsAttached || Config.IsDevelopment() || Config.IsLocal())
if (Debugger.IsAttached || Config.IsLocal())
{
builder.AddDeveloperSigningCredential();
}
Expand All @@ -104,7 +104,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
.AddRazorOptions(
// we need to explicitly set AllowRecompilingViewsOnFileChange because we use a custom environment "Local" for local dev
// https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?view=aspnetcore-2.2#runtime-compilation
options => options.AllowRecompilingViewsOnFileChange = env.IsDevelopment() || Config.IsLocal());
options => options.AllowRecompilingViewsOnFileChange = Config.IsLocal());

//Add the distributed redis cache
services.AddRedisCache();
Expand Down Expand Up @@ -185,7 +185,7 @@ public IContainer BuildContainerIoC(IServiceCollection services)
public void Configure(IApplicationBuilder app, IApplicationLifetime lifetime)
{
app.UseMiddleware<ExceptionMiddleware>();
if (Debugger.IsAttached || Config.IsDevelopment() || Config.IsLocal())
if (Debugger.IsAttached || Config.IsLocal())
{
IdentityModelEventSource.ShowPII = true;

Expand Down
2 changes: 1 addition & 1 deletion GenderPayGap.WebUI/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
.AddRazorOptions(
// we need to explicitly set AllowRecompilingViewsOnFileChange because we use a custom environment "Local" for local dev
// https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?view=aspnetcore-2.2#runtime-compilation
options => options.AllowRecompilingViewsOnFileChange = env.IsDevelopment() || Config.IsLocal())
options => options.AllowRecompilingViewsOnFileChange = Config.IsLocal())
.AddDataAnnotationsLocalization(
options => { options.DataAnnotationLocalizerProvider = DataAnnotationLocalizerProvider.DefaultResourceHandler; });

Expand Down

0 comments on commit a409f79

Please sign in to comment.