103 references to PreferTopLevelStatements
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (94)
ConvertProgram\ConvertToProgramMainAnalyzerTests.cs (25)
35Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 57Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false } }, 79Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Silent } }, 103Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Silent } }, 129Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Silent } }, 145Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Silent } }, 162Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.None } }, 184Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 209{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 236Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 266Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 304Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 331Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 362Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 390Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 420Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 447Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 475Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 499Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 522Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 557Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 596Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 629Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 667Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } }, 704Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion } },
ConvertProgram\ConvertToProgramMainRefactoringTests.cs (4)
120{ CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion }, 139{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 158{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Silent }, 184{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.None },
ConvertProgram\ConvertToTopLevelStatementsAnalyzerTests.cs (56)
40Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, false } }, 63Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 86Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 111Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 139Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 167Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 196Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 219Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 241Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true } }, 264Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 287Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 315Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 343Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 368Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 390Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 413Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 436Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 463Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 486Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 510Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 534Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 559Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 585Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 611Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 637Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 663Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 688Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 713Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 740Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 767Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 792Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 817Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 842Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 865Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 892Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 919Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 946Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 973Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1000Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1027Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1054Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1081Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1110Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1134Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1163Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1200Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1237Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1278Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1305Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1346Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1385Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1427Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1467Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1497Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1526Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } }, 1571Options = { { CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion } },
ConvertProgram\ConvertToTopLevelStatementsRefactoringTests.cs (7)
88{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 113{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 139{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 171{ CSharpCodeStyleOptions.PreferTopLevelStatements, false, NotificationOption2.Suggestion }, 196{ CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Suggestion }, 221{ CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.Silent }, 248{ CSharpCodeStyleOptions.PreferTopLevelStatements, true, NotificationOption2.None },
Formatting\CSharpNewDocumentFormattingServiceTests.cs (2)
272{ CSharpCodeStyleOptions.PreferTopLevelStatements, new CodeStyleOption2<bool>(value: true, notification: NotificationOption2.Suggestion) } 294{ CSharpCodeStyleOptions.PreferTopLevelStatements, new CodeStyleOption2<bool>(value: false, notification: NotificationOption2.Suggestion) }
Microsoft.CodeAnalysis.CSharp.Features (3)
ConvertToProgramMainDiagnosticAnalyzer.cs (1)
23CSharpCodeStyleOptions.PreferTopLevelStatements,
ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
25CSharpCodeStyleOptions.PreferTopLevelStatements,
CSharpAnalyzerOptionsProvider.cs (1)
60public CodeStyleOption2<bool> PreferTopLevelStatements => GetOption(CSharpCodeStyleOptions.PreferTopLevelStatements, FallbackSyntaxFormattingOptions.PreferTopLevelStatements);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
CSharpCodeFixOptionsProvider.cs (1)
66public CodeStyleOption2<bool> PreferTopLevelStatements => GetOption(CSharpCodeStyleOptions.PreferTopLevelStatements, FallbackSyntaxFormattingOptions.PreferTopLevelStatements);
CSharpSyntaxFormattingOptions.cs (1)
113PreferTopLevelStatements = options.GetOption(CSharpCodeStyleOptions.PreferTopLevelStatements, fallbackOptions.PreferTopLevelStatements);
Microsoft.VisualStudio.LanguageServices.CSharp (4)
EditorConfigSettings\DataProvider\CodeStyle\CSharpCodeStyleSettingsProvider.cs (1)
103yield return CodeStyleSetting.Create(CSharpCodeStyleOptions.PreferTopLevelStatements, ServicesVSResources.Prefer_top_level_statements, options, updater);
Options\AutomationObject\AutomationObject.Style.cs (2)
356get { return GetXmlOption(CSharpCodeStyleOptions.PreferTopLevelStatements); } 357set { SetXmlOption(CSharpCodeStyleOptions.PreferTopLevelStatements, value); }
Options\Formatting\StyleViewModel.cs (1)
2240CodeStyleItems.Add(new BooleanCodeStyleOptionViewModel(CSharpCodeStyleOptions.PreferTopLevelStatements, ServicesVSResources.Prefer_top_level_statements, s_preferTopLevelStatements, s_preferProgramMain, this, optionStore, codeBlockPreferencesGroupTitle));