2 writes to Spacing
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CSharpSyntaxFormattingOptions.cs (1)
72
Spacing
=
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CSharp (1)
Formatting\OmniSharpSyntaxFormattingOptionsFactory.cs (1)
93
Spacing
=
85 references to Spacing
Microsoft.CodeAnalysis.CSharp.Workspaces (62)
CSharpSyntaxFormattingOptions.cs (21)
73
(options.GetOption(CSharpFormattingOptions2.SpacesIgnoreAroundVariableDeclaration, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.IgnoreAroundVariableDeclaration)) ? SpacePlacement.IgnoreAroundVariableDeclaration : 0) |
74
(options.GetOption(CSharpFormattingOptions2.SpacingAfterMethodDeclarationName, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.AfterMethodDeclarationName)) ? SpacePlacement.AfterMethodDeclarationName : 0) |
75
(options.GetOption(CSharpFormattingOptions2.SpaceBetweenEmptyMethodDeclarationParentheses, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.BetweenEmptyMethodDeclarationParentheses)) ? SpacePlacement.BetweenEmptyMethodDeclarationParentheses : 0) |
76
(options.GetOption(CSharpFormattingOptions2.SpaceWithinMethodDeclarationParenthesis, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)) ? SpacePlacement.WithinMethodDeclarationParenthesis : 0) |
77
(options.GetOption(CSharpFormattingOptions2.SpaceAfterMethodCallName, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.AfterMethodCallName)) ? SpacePlacement.AfterMethodCallName : 0) |
78
(options.GetOption(CSharpFormattingOptions2.SpaceBetweenEmptyMethodCallParentheses, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.BetweenEmptyMethodCallParentheses)) ? SpacePlacement.BetweenEmptyMethodCallParentheses : 0) |
79
(options.GetOption(CSharpFormattingOptions2.SpaceWithinMethodCallParentheses, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.WithinMethodCallParentheses)) ? SpacePlacement.WithinMethodCallParentheses : 0) |
80
(options.GetOption(CSharpFormattingOptions2.SpaceAfterControlFlowStatementKeyword, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.AfterControlFlowStatementKeyword)) ? SpacePlacement.AfterControlFlowStatementKeyword : 0) |
81
options.GetOption(CSharpFormattingOptions2.SpaceBetweenParentheses, fallbackOptions.
Spacing
.ToSpacingWithinParentheses()).ToSpacePlacement() |
82
(options.GetOption(CSharpFormattingOptions2.SpaceBeforeSemicolonsInForStatement, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement)) ? SpacePlacement.BeforeSemicolonsInForStatement : 0) |
83
(options.GetOption(CSharpFormattingOptions2.SpaceAfterSemicolonsInForStatement, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.AfterSemicolonsInForStatement)) ? SpacePlacement.AfterSemicolonsInForStatement : 0) |
84
(options.GetOption(CSharpFormattingOptions2.SpaceAfterCast, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.AfterCast)) ? SpacePlacement.AfterCast : 0) |
85
(options.GetOption(CSharpFormattingOptions2.SpaceBeforeOpenSquareBracket, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.BeforeOpenSquareBracket)) ? SpacePlacement.BeforeOpenSquareBracket : 0) |
86
(options.GetOption(CSharpFormattingOptions2.SpaceBetweenEmptySquareBrackets, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.BetweenEmptySquareBrackets)) ? SpacePlacement.BetweenEmptySquareBrackets : 0) |
87
(options.GetOption(CSharpFormattingOptions2.SpaceWithinSquareBrackets, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.WithinSquareBrackets)) ? SpacePlacement.WithinSquareBrackets : 0) |
88
(options.GetOption(CSharpFormattingOptions2.SpaceAfterColonInBaseTypeDeclaration, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.AfterColonInBaseTypeDeclaration)) ? SpacePlacement.AfterColonInBaseTypeDeclaration : 0) |
89
(options.GetOption(CSharpFormattingOptions2.SpaceBeforeColonInBaseTypeDeclaration, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.BeforeColonInBaseTypeDeclaration)) ? SpacePlacement.BeforeColonInBaseTypeDeclaration : 0) |
90
(options.GetOption(CSharpFormattingOptions2.SpaceAfterComma, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.AfterComma)) ? SpacePlacement.AfterComma : 0) |
91
(options.GetOption(CSharpFormattingOptions2.SpaceBeforeComma, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.BeforeComma)) ? SpacePlacement.BeforeComma : 0) |
92
(options.GetOption(CSharpFormattingOptions2.SpaceAfterDot, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.AfterDot)) ? SpacePlacement.AfterDot : 0) |
93
(options.GetOption(CSharpFormattingOptions2.SpaceBeforeDot, fallbackOptions.
Spacing
.HasFlag(SpacePlacement.BeforeDot)) ? SpacePlacement.BeforeDot : 0);
SpacingFormattingRule.cs (41)
36
if (_options.
Spacing
== newOptions.
Spacing
&&
63
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterMethodDeclarationName));
77
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterMethodDeclarationName));
90
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterMethodDeclarationName));
96
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterMethodDeclarationName));
101
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.BetweenEmptyMethodDeclarationParentheses));
106
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis));
111
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis));
120
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterMethodCallName));
125
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.BetweenEmptyMethodCallParentheses));
130
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinMethodCallParentheses));
135
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinMethodCallParentheses));
141
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterMethodCallName));
146
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinMethodCallParentheses));
151
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinMethodCallParentheses));
161
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterControlFlowStatementKeyword));
168
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinExpressionParentheses));
175
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinCastParentheses));
184
|| _options.
Spacing
.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement)))
186
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement));
189
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterSemicolonsInForStatement));
195
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinOtherParentheses));
200
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinOtherParentheses));
206
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterCast));
215
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterComma));
228
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.BeforeOpenSquareBracket));
236
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.BetweenEmptySquareBrackets));
242
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinSquareBrackets));
247
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinSquareBrackets));
273
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterColonInBaseTypeDeclaration));
279
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.BeforeColonInBaseTypeDeclaration));
289
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterComma));
299
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.BeforeComma));
305
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterDot));
311
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.BeforeDot));
317
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.AfterSemicolonsInForStatement));
323
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement));
447
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis));
454
return AdjustSpacesOperationZeroOrOne(_options.
Spacing
.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis));
580
if (_options.
Spacing
.HasFlag(SpacePlacement.IgnoreAroundVariableDeclaration))
Microsoft.CodeAnalysis.Workspaces.UnitTests (23)
Formatter\FormatterTests.cs (23)
149
Assert.False(formattingOptions.
Spacing
.HasFlag(SpacePlacement.AfterControlFlowStatementKeyword));
150
Assert.False(formattingOptions.
Spacing
.HasFlag(SpacePlacement.AfterSemicolonsInForStatement));
151
Assert.False(formattingOptions.
Spacing
.HasFlag(SpacePlacement.AfterColonInBaseTypeDeclaration));
152
Assert.False(formattingOptions.
Spacing
.HasFlag(SpacePlacement.BeforeColonInBaseTypeDeclaration));
153
Assert.False(formattingOptions.
Spacing
.HasFlag(SpacePlacement.AfterComma));
154
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.IgnoreAroundVariableDeclaration));
155
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.AfterMethodDeclarationName));
156
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.BetweenEmptyMethodDeclarationParentheses));
157
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis));
158
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.AfterMethodCallName));
159
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.BetweenEmptyMethodCallParentheses));
160
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.WithinMethodCallParentheses));
161
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.WithinExpressionParentheses));
162
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.WithinCastParentheses));
163
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement));
164
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.WithinOtherParentheses));
165
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.AfterCast));
166
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.BeforeOpenSquareBracket));
167
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.BetweenEmptySquareBrackets));
168
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.WithinSquareBrackets));
169
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.BeforeComma));
170
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.AfterDot));
171
Assert.True(formattingOptions.
Spacing
.HasFlag(SpacePlacement.BeforeDot));