44 references to IndentationPlacement
Microsoft.CodeAnalysis.CSharp.Workspaces (33)
CSharpFormattingOptions2.cs (5)
198CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.Braces)) 203CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.BlockContents)) 208CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchSection)) 213CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchSection)) 218CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock))
CSharpSyntaxFormattingOptions.cs (16)
47public const IndentationPlacement IndentationDefault = 48IndentationPlacement.BlockContents | 49IndentationPlacement.SwitchCaseContents | 50IndentationPlacement.SwitchCaseContentsWhenBlock | 51IndentationPlacement.SwitchSection; 59[DataMember] public IndentationPlacement Indentation { get; init; } = IndentationDefault; 105(options.GetOption(CSharpFormattingOptions2.IndentBraces, fallbackOptions.Indentation.HasFlag(IndentationPlacement.Braces)) ? IndentationPlacement.Braces : 0) | 106(options.GetOption(CSharpFormattingOptions2.IndentBlock, fallbackOptions.Indentation.HasFlag(IndentationPlacement.BlockContents)) ? IndentationPlacement.BlockContents : 0) | 107(options.GetOption(CSharpFormattingOptions2.IndentSwitchCaseSection, fallbackOptions.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents)) ? IndentationPlacement.SwitchCaseContents : 0) | 108(options.GetOption(CSharpFormattingOptions2.IndentSwitchCaseSectionWhenBlock, fallbackOptions.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)) ? IndentationPlacement.SwitchCaseContentsWhenBlock : 0) | 109(options.GetOption(CSharpFormattingOptions2.IndentSwitchSection, fallbackOptions.Indentation.HasFlag(IndentationPlacement.SwitchSection)) ? IndentationPlacement.SwitchSection : 0);
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) 232if (node is BlockSyntax && !_options.Indentation.HasFlag(IndentationPlacement.BlockContents)) 238if (node is SwitchStatementSyntax && !_options.Indentation.HasFlag(IndentationPlacement.SwitchSection))
IndentUserSettingsFormattingRule.cs (3)
32if (_options.Indentation.HasFlag(IndentationPlacement.Braces) == newOptions.Indentation.HasFlag(IndentationPlacement.Braces)) 52if (_options.Indentation.HasFlag(IndentationPlacement.Braces))
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CSharp (5)
Formatting\OmniSharpSyntaxFormattingOptionsFactory.cs (5)
135(indentBraces ? IndentationPlacement.Braces : 0) | 136(indentBlock ? IndentationPlacement.BlockContents : 0) | 137(indentSwitchCaseSection ? IndentationPlacement.SwitchCaseContents : 0) | 138(indentSwitchCaseSectionWhenBlock ? IndentationPlacement.SwitchCaseContentsWhenBlock : 0) | 139(indentSwitchSection ? IndentationPlacement.SwitchSection : 0),
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
Formatter\FormatterTests.cs (5)
193Assert.True(formattingOptions.Indentation.HasFlag(IndentationPlacement.Braces)); 194Assert.False(formattingOptions.Indentation.HasFlag(IndentationPlacement.BlockContents)); 195Assert.False(formattingOptions.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents)); 196Assert.False(formattingOptions.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)); 197Assert.False(formattingOptions.Indentation.HasFlag(IndentationPlacement.SwitchSection));
Remote\ServiceDescriptorTests.cs (1)
252Indentation = IndentationPlacement.SwitchSection