diff --git a/EnvelopeGenerator.Web/Program.cs b/EnvelopeGenerator.Web/Program.cs index d21451f3..4e158971 100644 --- a/EnvelopeGenerator.Web/Program.cs +++ b/EnvelopeGenerator.Web/Program.cs @@ -165,8 +165,8 @@ try }); // Register the FlagIconCssClass instance as a singleton - builder.Services.Configure(config.GetSection("Cultures")); - builder.Services.AddSingleton(sp => sp.GetRequiredService>().Value); + builder.Services.Configure(config.GetSection("Cultures")); + builder.Services.AddSingleton(sp => sp.GetRequiredService>().Value); // Register mail services #pragma warning disable CS0618 // Type or member is obsolete @@ -187,8 +187,8 @@ try var app = builder.Build(); - app.UseMiddleware(); app.UseMiddleware(); + app.UseMiddleware(); // Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) @@ -230,7 +230,7 @@ try app.UseAuthentication(); app.UseAuthorization(); - var cultures = app.Services.GetRequiredService(); + var cultures = app.Services.GetRequiredService(); if (!cultures.Any()) throw new InvalidOperationException(@"Languages section is missing in the appsettings. Please configure like following. Language is both a name of the culture and the name of the resx file such as Resource.de-DE.resx