45 references to IndentationPlacement
Microsoft.CodeAnalysis.CSharp.Workspaces (28)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (5)
191
CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(
IndentationPlacement
.Braces))
196
CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(
IndentationPlacement
.BlockContents))
201
CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(
IndentationPlacement
.SwitchSection))
206
CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(
IndentationPlacement
.SwitchSection))
211
CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(
IndentationPlacement
.SwitchCaseContentsWhenBlock))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpSyntaxFormattingOptions.cs (11)
47
public const
IndentationPlacement
IndentationDefault =
48
IndentationPlacement
.BlockContents |
49
IndentationPlacement
.SwitchCaseContents |
50
IndentationPlacement
.SwitchCaseContentsWhenBlock |
51
IndentationPlacement
.SwitchSection;
59
[DataMember] public
IndentationPlacement
Indentation { get; init; } = IndentationDefault;
106
(options.GetOption(CSharpFormattingOptions2.IndentBraces) ?
IndentationPlacement
.Braces : 0) |
107
(options.GetOption(CSharpFormattingOptions2.IndentBlock) ?
IndentationPlacement
.BlockContents : 0) |
108
(options.GetOption(CSharpFormattingOptions2.IndentSwitchCaseSection) ?
IndentationPlacement
.SwitchCaseContents : 0) |
109
(options.GetOption(CSharpFormattingOptions2.IndentSwitchCaseSectionWhenBlock) ?
IndentationPlacement
.SwitchCaseContentsWhenBlock : 0) |
110
(options.GetOption(CSharpFormattingOptions2.IndentSwitchSection) ?
IndentationPlacement
.SwitchSection : 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (9)
88
if (!_options.Indentation.HasFlag(
IndentationPlacement
.SwitchCaseContents) && !_options.Indentation.HasFlag(
IndentationPlacement
.SwitchCaseContentsWhenBlock))
94
var alwaysIndent = _options.Indentation.HasFlag(
IndentationPlacement
.SwitchCaseContents) && _options.Indentation.HasFlag(
IndentationPlacement
.SwitchCaseContentsWhenBlock);
98
Debug.Assert(_options.Indentation.HasFlag(
IndentationPlacement
.SwitchCaseContents) != _options.Indentation.HasFlag(
IndentationPlacement
.SwitchCaseContentsWhenBlock));
101
if (_options.Indentation.HasFlag(
IndentationPlacement
.SwitchCaseContentsWhenBlock) != firstStatementIsBlock)
238
if (node is BlockSyntax && !_options.Indentation.HasFlag(
IndentationPlacement
.BlockContents))
244
if (node is SwitchStatementSyntax && !_options.Indentation.HasFlag(
IndentationPlacement
.SwitchSection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentUserSettingsFormattingRule.cs (3)
29
if (_options.Indentation.HasFlag(
IndentationPlacement
.Braces) == newOptions.Indentation.HasFlag(
IndentationPlacement
.Braces))
49
if (_options.Indentation.HasFlag(
IndentationPlacement
.Braces))
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CSharp (5)
Formatting\OmniSharpSyntaxFormattingOptionsFactory.cs (5)
130
(indentBraces ?
IndentationPlacement
.Braces : 0) |
131
(indentBlock ?
IndentationPlacement
.BlockContents : 0) |
132
(indentSwitchCaseSection ?
IndentationPlacement
.SwitchCaseContents : 0) |
133
(indentSwitchCaseSectionWhenBlock ?
IndentationPlacement
.SwitchCaseContentsWhenBlock : 0) |
134
(indentSwitchSection ?
IndentationPlacement
.SwitchSection : 0),
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (6)
RazorCSharpSyntaxFormattingOptions.cs (6)
57
Indentation = (
IndentationPlacement
)Indentation,
124
Braces =
IndentationPlacement
.Braces,
125
BlockContents =
IndentationPlacement
.BlockContents,
126
SwitchCaseContents =
IndentationPlacement
.SwitchCaseContents,
127
SwitchCaseContentsWhenBlock =
IndentationPlacement
.SwitchCaseContentsWhenBlock,
128
SwitchSection =
IndentationPlacement
.SwitchSection,
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
Formatter\FormatterTests.cs (5)
192
Assert.True(formattingOptions.Indentation.HasFlag(
IndentationPlacement
.Braces));
193
Assert.False(formattingOptions.Indentation.HasFlag(
IndentationPlacement
.BlockContents));
194
Assert.False(formattingOptions.Indentation.HasFlag(
IndentationPlacement
.SwitchCaseContents));
195
Assert.False(formattingOptions.Indentation.HasFlag(
IndentationPlacement
.SwitchCaseContentsWhenBlock));
196
Assert.False(formattingOptions.Indentation.HasFlag(
IndentationPlacement
.SwitchSection));
Remote\ServiceDescriptorTests.cs (1)
243
Indentation =
IndentationPlacement
.SwitchSection