28 references to IndentationPlacement
Microsoft.CodeAnalysis.CSharp.Workspaces (28)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (5)
194
CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(
IndentationPlacement
.Braces))
199
CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(
IndentationPlacement
.BlockContents))
204
CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(
IndentationPlacement
.SwitchSection))
209
CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(
IndentationPlacement
.SwitchSection))
214
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)
32
if (_options.Indentation.HasFlag(
IndentationPlacement
.Braces) == newOptions.Indentation.HasFlag(
IndentationPlacement
.Braces))
52
if (_options.Indentation.HasFlag(
IndentationPlacement
.Braces))