File tree Expand file tree Collapse file tree 4 files changed +25
-3
lines changed
src/Pandatech.VerticalSlices Expand file tree Collapse file tree 4 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,20 @@ dotnet_diagnostic.ca2016.severity = error #Forwarding cancellation tokens
150150csharp_style_namespace_declarations = file_scoped:error
151151resharper_entity_framework_model_validation_unlimited_string_length_highlighting = none
152152
153+ [* .{cs,vb} ]
154+
155+ # Async methods should have "Async" suffix
156+ dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods
157+ dotnet_naming_rule.async_methods_end_in_async.style = end_in_async
158+ dotnet_naming_rule.async_methods_end_in_async.severity = error
159+
160+ dotnet_naming_symbols.any_async_methods.applicable_kinds = method
161+ dotnet_naming_symbols.any_async_methods.applicable_accessibilities = *
162+ dotnet_naming_symbols.any_async_methods.required_modifiers = async
163+
164+ dotnet_naming_style.end_in_async.required_suffix = Async
165+ dotnet_naming_style.end_in_async.capitalization = pascal_case
166+
153167# ########################
154168# VS added settings #
155169# ########################
Original file line number Diff line number Diff line change 88using Pandatech . VerticalSlices . Features . Auth . Helpers ;
99using Pandatech . VerticalSlices . Features . Auth . Helpers . ApiAuth . MinimalApiExtensions ;
1010using Pandatech . VerticalSlices . SharedKernel . Enums ;
11+ using Pandatech . VerticalSlices . SharedKernel . Extensions ;
1112using Pandatech . VerticalSlices . SharedKernel . Helpers ;
1213using ResponseCrafter . Extensions ;
1314
@@ -46,7 +47,7 @@ public void AddRoutes(IEndpointRouteBuilder app)
4647 return TypedResults . Ok ( response ) ;
4748 }
4849
49- var domain = configuration [ "Security:CookieDomain" ] ! ;
50+ var domain = configuration . GetCookieDomain ( ) ;
5051 httpContextAccessor . HttpContext ! . PrepareAndSetCookies ( response , environment , domain ) ;
5152
5253 return TypedResults . Ok ( response ) ;
@@ -75,7 +76,7 @@ public void AddRoutes(IEndpointRouteBuilder app)
7576 return TypedResults . Ok ( response ) ;
7677 }
7778
78- var domain = configuration [ "Security:CookieDomain" ] ! ;
79+ var domain = configuration . GetCookieDomain ( ) ;
7980 httpContextAccessor . HttpContext ! . PrepareAndSetCookies ( response , environment , domain ) ;
8081
8182 return TypedResults . Ok ( response ) ;
Original file line number Diff line number Diff line change 77using Pandatech . VerticalSlices . Features . MyAccount . Application . Logout ;
88using Pandatech . VerticalSlices . Features . MyAccount . Application . PersonalInformation ;
99using Pandatech . VerticalSlices . Features . MyAccount . Application . UpdateOwnPassword ;
10+ using Pandatech . VerticalSlices . SharedKernel . Extensions ;
1011using Pandatech . VerticalSlices . SharedKernel . Helpers ;
1112using ResponseCrafter . Extensions ;
1213
@@ -54,7 +55,7 @@ public void AddRoutes(IEndpointRouteBuilder app)
5455 IConfiguration configuration ,
5556 CancellationToken token ) =>
5657 {
57- var domain = configuration [ "Security:CookieDomain" ] ! ;
58+ var domain = configuration . GetCookieDomain ( ) ;
5859 await sender . Send ( new LogoutCommand ( ) , token ) ;
5960 httpContextAccessor . HttpContext ! . DeleteAllCookies ( environment , domain ) ;
6061 return TypedResults . Ok ( ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ public static class ConfigurationExtensions
1313 private const string SuperUserPasswordConfigurationPath = "Security:SuperUser:Password" ;
1414 private const string PersistentConfigurationPath = "PersistentStorage" ;
1515 private const string RepositoryNameConfigurationPath = "RepositoryName" ;
16+ private const string CookieDomainConfigurationPath = "Security:CookieDomain" ;
1617
1718 public static string GetFileStoragePath ( this IConfiguration configuration )
1819 {
@@ -74,4 +75,9 @@ public static string GetSuperuserPassword(this IConfiguration configuration)
7475 {
7576 return configuration [ SuperUserPasswordConfigurationPath ] ! ;
7677 }
78+
79+ public static string GetCookieDomain ( this IConfiguration configuration )
80+ {
81+ return configuration [ CookieDomainConfigurationPath ] ! ;
82+ }
7783}
You can’t perform that action at this time.
0 commit comments