45 references to IndentationPlacement
Microsoft.CodeAnalysis.CSharp.Workspaces (28)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (5)
191CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.Braces)) 196CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.BlockContents)) 201CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchSection)) 206CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchSection)) 211CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpSyntaxFormattingOptions.cs (11)
47public const IndentationPlacement IndentationDefault = 48IndentationPlacement.BlockContents | 49IndentationPlacement.SwitchCaseContents | 50IndentationPlacement.SwitchCaseContentsWhenBlock | 51IndentationPlacement.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)
88if (!_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) && !_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)) 94var alwaysIndent = _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) && _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock); 98Debug.Assert(_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) != _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)); 101if (_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock) != firstStatementIsBlock) 238if (node is BlockSyntax && !_options.Indentation.HasFlag(IndentationPlacement.BlockContents)) 244if (node is SwitchStatementSyntax && !_options.Indentation.HasFlag(IndentationPlacement.SwitchSection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentUserSettingsFormattingRule.cs (3)
29if (_options.Indentation.HasFlag(IndentationPlacement.Braces) == newOptions.Indentation.HasFlag(IndentationPlacement.Braces)) 49if (_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)
57Indentation = (IndentationPlacement)Indentation, 124Braces = IndentationPlacement.Braces, 125BlockContents = IndentationPlacement.BlockContents, 126SwitchCaseContents = IndentationPlacement.SwitchCaseContents, 127SwitchCaseContentsWhenBlock = IndentationPlacement.SwitchCaseContentsWhenBlock, 128SwitchSection = IndentationPlacement.SwitchSection,
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
Formatter\FormatterTests.cs (5)
192Assert.True(formattingOptions.Indentation.HasFlag(IndentationPlacement.Braces)); 193Assert.False(formattingOptions.Indentation.HasFlag(IndentationPlacement.BlockContents)); 194Assert.False(formattingOptions.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents)); 195Assert.False(formattingOptions.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)); 196Assert.False(formattingOptions.Indentation.HasFlag(IndentationPlacement.SwitchSection));
Remote\ServiceDescriptorTests.cs (1)
243Indentation = IndentationPlacement.SwitchSection