diff --git a/src/Configuration/JsonFileConfigurationExtensions.cs b/src/Configuration/JsonFileConfigurationExtensions.cs index 3977c206..414524d0 100644 --- a/src/Configuration/JsonFileConfigurationExtensions.cs +++ b/src/Configuration/JsonFileConfigurationExtensions.cs @@ -83,7 +83,7 @@ internal static Stream MakeKeyPerJsonFileInputStream(this FileInfo jsonFile, ILo json = $$$""" { "{{{Path.GetFileNameWithoutExtension(jsonFile.FullName)}}}": - {{{json}}} + { { { json} } } } """; return new MemoryStream(json.ToUTF8Bytes()); diff --git a/src/Http/Services/HttpServicesExtensions.cs b/src/Http/Services/HttpServicesExtensions.cs index c467982c..e78ea998 100644 --- a/src/Http/Services/HttpServicesExtensions.cs +++ b/src/Http/Services/HttpServicesExtensions.cs @@ -119,7 +119,7 @@ public static IHostApplicationBuilder AddHttpServices( ); } - if(options.IIS != null) + if (options.IIS != null) { builder.Services.Configure( options => @@ -127,7 +127,7 @@ public static IHostApplicationBuilder AddHttpServices( ); } - if(options.Kestrel != null) + if (options.Kestrel != null) { builder.Services.Configure( options => diff --git a/src/Http/Services/UseHttpServicesExtensions.cs b/src/Http/Services/UseHttpServicesExtensions.cs index c79388aa..c9447bf6 100644 --- a/src/Http/Services/UseHttpServicesExtensions.cs +++ b/src/Http/Services/UseHttpServicesExtensions.cs @@ -11,7 +11,7 @@ public static IApplicationBuilder UseHttpServices(this IApplicationBuilder app) { var options = app.ApplicationServices.GetRequiredService>().Value; - if(options.UseRequestDecompression) + if (options.UseRequestDecompression) { app.UseRequestDecompression(); } @@ -21,37 +21,37 @@ public static IApplicationBuilder UseHttpServices(this IApplicationBuilder app) app.UseResponseCompression(); } - if(options.UseFileServer) + if (options.UseFileServer) { app.UseFileServer(options.FileServer); - if(options.FileServer.EnableDefaultFiles) + if (options.FileServer.EnableDefaultFiles) { app.UseDefaultFiles(options.FileServer.DefaultFilesOptions); } - if(options.FileServer.EnableDirectoryBrowsing) + if (options.FileServer.EnableDirectoryBrowsing) { app.UseDirectoryBrowser(options.FileServer.DirectoryBrowserOptions); } - if(options.FileServer.StaticFileOptions != null) + if (options.FileServer.StaticFileOptions != null) { app.UseStaticFiles(options.FileServer.StaticFileOptions); } } - if(options.UseResponseCaching) + if (options.UseResponseCaching) { app.UseResponseCaching(); } - if(options.UseForwardedHeaders) + if (options.UseForwardedHeaders) { app.UseForwardedHeaders(options.ForwardedHeaders); } - if(options.UseCors) + if (options.UseCors) { app.UseCors(); // _ = app.UseCors(corsOptions => corsOptions @@ -63,22 +63,22 @@ public static IApplicationBuilder UseHttpServices(this IApplicationBuilder app) // ); } - if(options.UseCookiePolicy) + if (options.UseCookiePolicy) { app.UseCookiePolicy(options.CookiePolicy); } - if(options.UseSession) + if (options.UseSession) { app.UseSession(options.Session); } - if(options.UseHsts) + if (options.UseHsts) { app.UseHsts(); } - if(options.UseHttpsRedirection) + if (options.UseHttpsRedirection) { app.UseHttpsRedirection(); } diff --git a/src/Mvc/IHostApplicationBuilderMvcExtensions.cs b/src/Mvc/IHostApplicationBuilderMvcExtensions.cs index 1376222a..b8027f95 100644 --- a/src/Mvc/IHostApplicationBuilderMvcExtensions.cs +++ b/src/Mvc/IHostApplicationBuilderMvcExtensions.cs @@ -21,7 +21,7 @@ public static IHostApplicationBuilder AddMvc(this IHostApplicationBuilder builde builder.Services.Configure(mvcOptionsSection); var mvcOptions = mvcOptionsSection.Get(); - if(mvcOptions is not null) + if (mvcOptions is not null) { #if NET5_0_OR_GREATER if(mvcOptions.EnableEndpointRouting) @@ -44,27 +44,27 @@ public static IHostApplicationBuilder AddMvc(this IHostApplicationBuilder builde } #endif - if(mvcOptions.AddControllersAsServices) + if (mvcOptions.AddControllersAsServices) { mvcBuilder.AddControllersAsServices(); } - if(mvcOptions.AddXmlSerializerFormatters) + if (mvcOptions.AddXmlSerializerFormatters) { mvcBuilder.AddXmlSerializerFormatters(); } - if(mvcOptions.AddXmlDataContractSerializerFormatters) + if (mvcOptions.AddXmlDataContractSerializerFormatters) { mvcBuilder.AddXmlDataContractSerializerFormatters(); } - if(mvcOptions.AddJsonOptions) + if (mvcOptions.AddJsonOptions) { mvcBuilder.AddJsonOptions(options => builder.Configuration.Bind(JsonSerializer, options)); } - if(mvcOptions.AddMvcConventions) + if (mvcOptions.AddMvcConventions) { // mvcBuilder.AddMvcOptions(options => builder.Configuration.Bind(configurationSectionKey, options)); }