4 writes to NewLines
IdeCoreBenchmarks (1)
FormatterBenchmarks.cs (1)
60
NewLines
= CSharpSyntaxFormattingOptions.Default.NewLines | NewLinePlacement.BeforeOpenBraceInTypes
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CSharpSyntaxFormattingOptions.cs (1)
95
NewLines
=
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CSharp (1)
Formatting\OmniSharpSyntaxFormattingOptionsFactory.cs (1)
117
NewLines
=
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Remote\ServiceDescriptorTests.cs (1)
269
NewLines
= NewLinePlacement.BeforeFinally
70 references to NewLines
IdeCoreBenchmarks (1)
FormatterBenchmarks.cs (1)
60
NewLines = CSharpSyntaxFormattingOptions.Default.
NewLines
| NewLinePlacement.BeforeOpenBraceInTypes
Microsoft.CodeAnalysis.CSharp.Features (12)
BraceCompletion\CurlyBraceCompletionService.cs (11)
122
if (_options.
NewLines
== newOptions.
NewLines
)
153
return options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers);
161
return options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors);
167
return options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods);
173
return options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes);
179
return options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks);
185
return options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody);
192
? options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties)
193
: options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods);
199
return options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes);
Wrapping\CSharpSyntaxWrappingOptions.cs (1)
33
var newLineBeforeOpenBraceDefault = ((CSharpSyntaxFormattingOptions)fallbackOptions.CleanupOptions.FormattingOptions).
NewLines
.ToNewLineBeforeOpenBracePlacement();
Microsoft.CodeAnalysis.CSharp.Workspaces (42)
CSharpSyntaxFormattingOptions.cs (7)
96
(options.GetOption(CSharpFormattingOptions2.NewLineForMembersInObjectInit, fallbackOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeMembersInObjectInitializers)) ? NewLinePlacement.BeforeMembersInObjectInitializers : 0) |
97
(options.GetOption(CSharpFormattingOptions2.NewLineForMembersInAnonymousTypes, fallbackOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeMembersInAnonymousTypes)) ? NewLinePlacement.BeforeMembersInAnonymousTypes : 0) |
98
(options.GetOption(CSharpFormattingOptions2.NewLineForElse, fallbackOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeElse)) ? NewLinePlacement.BeforeElse : 0) |
99
(options.GetOption(CSharpFormattingOptions2.NewLineForCatch, fallbackOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeCatch)) ? NewLinePlacement.BeforeCatch : 0) |
100
(options.GetOption(CSharpFormattingOptions2.NewLineForFinally, fallbackOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeFinally)) ? NewLinePlacement.BeforeFinally : 0) |
101
options.GetOption(CSharpFormattingOptions2.NewLineBeforeOpenBrace, fallbackOptions.
NewLines
.ToNewLineBeforeOpenBracePlacement()).ToNewLinePlacement() |
102
(options.GetOption(CSharpFormattingOptions2.NewLineForClausesInQuery, fallbackOptions.
NewLines
.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses)) ? NewLinePlacement.BetweenQueryExpressionClauses : 0);
NewLineUserSettingFormattingRule.cs (32)
31
if (_options.
NewLines
== newOptions.
NewLines
&&
87
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeElse))
96
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeCatch))
105
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeFinally))
114
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes))
123
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes))
139
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers))
151
? _options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties)
152
: _options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods);
162
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors))
171
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods))
180
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods))
190
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody))
199
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers))
208
if (!_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks))
228
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeMembersInObjectInitializers))
242
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeMembersInAnonymousTypes))
256
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeElse)
270
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeCatch))
283
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeFinally))
296
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes))
309
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes))
326
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers))
352
? _options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties)
353
: _options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods);
368
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors))
381
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods))
394
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods))
408
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody))
421
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers))
434
if (_options.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks))
QueryExpressionFormattingRule.cs (3)
33
if (_options.
NewLines
.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses) == newOptions.
NewLines
.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses))
158
if (_options.
NewLines
.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses))
Microsoft.CodeAnalysis.Workspaces.UnitTests (15)
Formatter\FormatterTests.cs (15)
175
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeMembersInObjectInitializers));
176
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeMembersInAnonymousTypes));
177
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeElse));
178
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeCatch));
179
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeFinally));
180
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes));
181
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes));
182
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers));
183
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties));
184
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods));
185
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors));
186
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods));
187
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody));
188
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks));
189
Assert.False(formattingOptions.
NewLines
.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses));