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