106 references to PreferTopLevelStatements
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Formatting\CSharpNewDocumentFormattingServiceTests.cs (2)
300{ CSharpCodeStyleOptions.PreferTopLevelStatements, new CodeStyleOption2<bool>(value: true, notification: NotificationOption2.Suggestion) } 324{ CSharpCodeStyleOptions.PreferTopLevelStatements, new CodeStyleOption2<bool>(value: false, notification: NotificationOption2.Suggestion) }
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\Analyzers\CodeStyle\CSharpAnalyzerOptionsProvider.cs (1)
37public CodeStyleOption2<bool> PreferTopLevelStatements => GetOption(CSharpCodeStyleOptions.PreferTopLevelStatements);
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToProgramMainDiagnosticAnalyzer.cs (1)
23CSharpCodeStyleOptions.PreferTopLevelStatements,
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
25CSharpCodeStyleOptions.PreferTopLevelStatements,
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (96)
ConvertProgram\ConvertToProgramMainAnalyzerTests.cs (25)
30Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 47Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false } }, 71Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Silent } }, 97Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Silent } }, 125Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Silent } }, 136Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Silent } }, 148Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.None } }, 169Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 193{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 219Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 248Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 285Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 311Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 341Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 368Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 397Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 423Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 450Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 473Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 495Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 528Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 565Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 597Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 634Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 669Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } },
ConvertProgram\ConvertToProgramMainRefactoringTests.cs (4)
107{ CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion }, 122{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 137{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Silent }, 161{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.None },
ConvertProgram\ConvertToTopLevelStatementsAnalyzerTests.cs (56)
49Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false } }, 69Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 94Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 121Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 151Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 181Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 212Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 237Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 256Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 281Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 301Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 326Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 351Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 373Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 391Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 411Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 431Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 455Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 475Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 496Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 517Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 544Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 567Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 590Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 613Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 636Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 658Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 680Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 704Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 728Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 750Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 772Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 794Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 814Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 843Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 872Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 901Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 930Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 959Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 988Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1017Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1046Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1077Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1103Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1134Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1173Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1212Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1255Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1284Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1327Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1368Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1412Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1454Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1486Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1517Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1564Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } },
ConvertProgram\ConvertToTopLevelStatementsRefactoringTests.cs (11)
77{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 97{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 118{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 144{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 165{ CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion }, 186{ CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Silent }, 211{ CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.None }, 248{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 292{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 332{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 382{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion },
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpSyntaxFormattingOptions.cs (1)
114PreferTopLevelStatements = options.GetOption(CSharpCodeStyleOptions.PreferTopLevelStatements);
Microsoft.VisualStudio.LanguageServices.CSharp (4)
EditorConfigSettings\DataProvider\CodeStyle\CSharpCodeStyleSettingsProvider.cs (1)
116yield return CodeStyleSetting.Create(CSharpCodeStyleOptions.PreferTopLevelStatements, ServicesVSResources.Prefer_top_level_statements, options, updater);
Options\AutomationObject\AutomationObject.Style.cs (2)
362get { return GetXmlOption(CSharpCodeStyleOptions.PreferTopLevelStatements); } 363set { SetXmlOption(CSharpCodeStyleOptions.PreferTopLevelStatements, value); }
Options\Formatting\StyleViewModel.cs (1)
2272CodeStyleItems.Add(new BooleanCodeStyleOptionViewModel(CSharpCodeStyleOptions.PreferTopLevelStatements, ServicesVSResources.Prefer_top_level_statements, s_preferTopLevelStatements, s_preferProgramMain, this, optionStore, codeBlockPreferencesGroupTitle));