File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ csharp_style_prefer_pattern_matching = true
9999csharp_style_prefer_switch_expression = true
100100
101101# Null-checking preferences
102- csharp_style_conditional_delegate_call = true
102+ csharp_style_conditional_delegate_call = true : suggestion
103103
104104# Modifier preferences
105105csharp_prefer_static_local_function = true
@@ -135,7 +135,7 @@ csharp_using_directive_placement = outside_namespace:silent
135135# New line preferences
136136csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
137137csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
138- csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
138+ csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true : silent
139139csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
140140csharp_style_allow_embedded_statements_on_same_line_experimental = true
141141
@@ -285,4 +285,6 @@ end_of_line = crlf
285285dotnet_style_explicit_tuple_names = true :suggestion
286286dotnet_style_prefer_inferred_tuple_names = true :suggestion
287287dotnet_style_prefer_inferred_anonymous_type_member_names = true :suggestion
288- dotnet_style_namespace_match_folder = false :suggestion
288+ dotnet_style_namespace_match_folder = false :suggestion
289+ dotnet_style_prefer_conditional_expression_over_assignment = false :silent
290+ dotnet_style_prefer_conditional_expression_over_return = false :silent
Original file line number Diff line number Diff line change @@ -18,11 +18,6 @@ public class SQLHelperModule : IModule
1818 /// Loads the module using the bootstrapper
1919 /// </summary>
2020 /// <param name="bootstrapper">The bootstrapper.</param>
21- public void Load ( IServiceCollection ? bootstrapper )
22- {
23- if ( bootstrapper is null )
24- return ;
25- bootstrapper . AddTransient < SQLHelper > ( ) ;
26- }
21+ public void Load ( IServiceCollection ? bootstrapper ) => bootstrapper ? . RegisterSQLHelper ( ) ;
2722 }
2823}
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ public static class RegistrationExtensions
4343 /// <returns>The service collection with SQLHelper registered.</returns>
4444 public static IServiceCollection ? RegisterSQLHelper ( this IServiceCollection ? services )
4545 {
46+ if ( services . Exists < SQLHelper > ( ) )
47+ return services ;
4648 return services ? . AddTransient < SQLHelper > ( )
4749 ? . RegisterBigBookOfDataTypes ( ) ;
4850 }
You can’t perform that action at this time.
0 commit comments