Skip to content

Commit ee0d2f9

Browse files
committedApr 7, 2022
switch to "csharp_prefer_braces = when_multiline" code style
1 parent e1c3533 commit ee0d2f9

File tree

58 files changed

+250
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+250
-1
lines changed
 

‎.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ csharp_style_throw_expression = true:suggestion
8383
csharp_style_conditional_delegate_call = true:suggestion
8484

8585
# Expression-level preferences
86-
csharp_prefer_braces = true:none
86+
csharp_prefer_braces = when_multiline:warning
8787
csharp_style_deconstructed_variable_declaration = true:suggestion
8888
csharp_prefer_simple_default_expression = true:suggestion
8989
csharp_style_pattern_local_over_anonymous_function = true:suggestion

‎src/Api.Contract/ApiContractSerializer.ModelMetadata.cs

+4
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,18 @@ static IEnumerable<Type> Visit(Type type, RuntimeTypeModel typeModel, HashSet<Ty
4040
var subTypes = typeModel.Add(type, applyDefaultBehaviour: true).GetSubtypes();
4141

4242
for (int i = 0, n = subTypes.Length; i < n; i++)
43+
{
4344
if (visited.Add(type = subTypes[i].DerivedType.Type))
4445
{
4546
using (var enumerator = Visit(type, typeModel, visited).GetEnumerator())
47+
{
4648
while (enumerator.MoveNext())
4749
yield return enumerator.Current;
50+
}
4851

4952
yield return type;
5053
}
54+
}
5155
}
5256
}
5357

0 commit comments

Comments
 (0)
Please sign in to comment.