@@ -45,14 +45,16 @@ dotnet_style_require_accessibility_modifiers = for_non_interface_members
45
45
dotnet_style_coalesce_expression = true
46
46
dotnet_style_collection_initializer = true
47
47
dotnet_style_explicit_tuple_names = true
48
- dotnet_style_namespace_match_folder = false
48
+ dotnet_style_namespace_match_folder = true
49
49
dotnet_style_null_propagation = true
50
50
dotnet_style_object_initializer = true
51
51
dotnet_style_operator_placement_when_wrapping = beginning_of_line
52
52
dotnet_style_prefer_auto_properties = true
53
+ dotnet_style_prefer_collection_expression = when_types_loosely_match
53
54
dotnet_style_prefer_compound_assignment = true
54
55
dotnet_style_prefer_conditional_expression_over_assignment = true
55
56
dotnet_style_prefer_conditional_expression_over_return = true
57
+ dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
56
58
dotnet_style_prefer_inferred_anonymous_type_member_names = true
57
59
dotnet_style_prefer_inferred_tuple_names = true
58
60
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
@@ -69,8 +71,8 @@ dotnet_code_quality_unused_parameters = all
69
71
dotnet_remove_unnecessary_suppression_exclusions = none
70
72
71
73
# New line preferences
72
- dotnet_style_allow_multiple_blank_lines_experimental = false
73
- dotnet_style_allow_statement_immediately_after_block_experimental = false
74
+ dotnet_style_allow_multiple_blank_lines_experimental = true
75
+ dotnet_style_allow_statement_immediately_after_block_experimental = true
74
76
75
77
# ### C# Coding Conventions ####
76
78
@@ -99,28 +101,33 @@ csharp_style_prefer_switch_expression = true
99
101
100
102
# Null-checking preferences
101
103
csharp_style_conditional_delegate_call = true
102
- csharp_style_prefer_parameter_null_checking = true
103
104
104
105
# Modifier preferences
106
+ csharp_prefer_static_anonymous_function = true
105
107
csharp_prefer_static_local_function = true
106
- csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
108
+ csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
109
+ csharp_style_prefer_readonly_struct = true
110
+ csharp_style_prefer_readonly_struct_member = true
107
111
108
112
# Code-block preferences
109
- csharp_prefer_braces = true
113
+ csharp_prefer_braces = when_multiline
110
114
csharp_prefer_simple_using_statement = true
111
- csharp_style_namespace_declarations = block_scoped
115
+ csharp_style_namespace_declarations = file_scoped
112
116
csharp_style_prefer_method_group_conversion = true
117
+ csharp_style_prefer_primary_constructors = true
118
+ csharp_style_prefer_top_level_statements = true
113
119
114
120
# Expression-level preferences
115
121
csharp_prefer_simple_default_expression = true
116
122
csharp_style_deconstructed_variable_declaration = true
117
123
csharp_style_implicit_object_creation_when_type_is_apparent = true
118
124
csharp_style_inlined_variable_declaration = true
119
- csharp_style_prefer_index_operator = false
125
+ csharp_style_prefer_index_operator = true
120
126
csharp_style_prefer_local_over_anonymous_function = true
121
127
csharp_style_prefer_null_check_over_type_check = true
122
- csharp_style_prefer_range_operator = false
128
+ csharp_style_prefer_range_operator = true
123
129
csharp_style_prefer_tuple_swap = true
130
+ csharp_style_prefer_utf8_string_literals = true
124
131
csharp_style_throw_expression = true
125
132
csharp_style_unused_value_assignment_preference = discard_variable
126
133
csharp_style_unused_value_expression_statement_preference = discard_variable
@@ -129,19 +136,21 @@ csharp_style_unused_value_expression_statement_preference = discard_variable
129
136
csharp_using_directive_placement = outside_namespace
130
137
131
138
# New line preferences
132
- csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
133
- csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
134
- csharp_style_allow_embedded_statements_on_same_line_experimental = false
139
+ csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
140
+ csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
141
+ csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
142
+ csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
143
+ csharp_style_allow_embedded_statements_on_same_line_experimental = true
135
144
136
145
# ### C# Formatting Rules ####
137
146
138
147
# New line preferences
139
- csharp_new_line_before_catch = false
140
- csharp_new_line_before_else = false
141
- csharp_new_line_before_finally = false
148
+ csharp_new_line_before_catch = true
149
+ csharp_new_line_before_else = true
150
+ csharp_new_line_before_finally = true
142
151
csharp_new_line_before_members_in_anonymous_types = true
143
152
csharp_new_line_before_members_in_object_initializers = true
144
- csharp_new_line_before_open_brace = none
153
+ csharp_new_line_before_open_brace = all
145
154
csharp_new_line_between_query_expression_clauses = true
146
155
147
156
# Indentation preferences
@@ -178,7 +187,7 @@ csharp_space_between_square_brackets = false
178
187
179
188
# Wrapping preferences
180
189
csharp_preserve_single_line_blocks = true
181
- csharp_preserve_single_line_statements = false
190
+ csharp_preserve_single_line_statements = true
182
191
183
192
# ### Naming styles ####
184
193
0 commit comments