114 references to Error
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (51)
CodeActions\EncapsulateField\EncapsulateFieldTests.cs (2)
1405""", options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error)); 1436""", options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error));
Diagnostics\GenerateType\GenerateTypeTests.cs (5)
2732options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error)); 3014options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error)); 3093options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error)); 3123options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.Error)); 3422parameters: new TestParameters(options: Option(CSharpCodeStyleOptions.PreferredUsingDirectivePlacement, AddImportPlacement.InsideNamespace, NotificationOption2.Error)));
EventHookup\EventHookupCommandHandlerTests.cs (1)
914using var testState = EventHookupTestState.CreateTestState(markup, QualifyMethodAccessWithNotification(NotificationOption2.Error));
ExtractClass\ExtractClassTests.cs (1)
1293{ CSharpCodeStyleOptions.NamespaceDeclarations, NamespaceDeclarationPreference.FileScoped, NotificationOption2.Error },
Formatting\CodeCleanupTests.cs (2)
851new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.InsideNamespace, NotificationOption2.Error); 854new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.OutsideNamespace, NotificationOption2.Error);
Formatting\CSharpNewDocumentFormattingServiceTests.cs (10)
43{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.Error) } 65{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.Error) } 86{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.Error) } 110{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.BlockScoped, NotificationOption2.Error) } 125{ CSharpCodeStyleOptions.PreferredUsingDirectivePlacement, new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.OutsideNamespace, NotificationOption2.Error) } 171{ CodeStyleOptions2.AccessibilityModifiersRequired, new CodeStyleOption2<AccessibilityModifiersRequired>(AccessibilityModifiersRequired.Always, NotificationOption2.Error) } 194{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.Error) }, 195{ CodeStyleOptions2.AccessibilityModifiersRequired, new CodeStyleOption2<AccessibilityModifiersRequired>(AccessibilityModifiersRequired.Always, NotificationOption2.Error) } 237{ CodeStyleOptions2.AccessibilityModifiersRequired, new CodeStyleOption2<AccessibilityModifiersRequired>(AccessibilityModifiersRequired.Always, NotificationOption2.Error) } 255{ CSharpCodeStyleOptions.PreferredUsingDirectivePlacement, new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.InsideNamespace, NotificationOption2.Error) }
GenerateConstructor\GenerateConstructorTests.cs (5)
555options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error)); 696options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error)); 872options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error)); 1013options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error)); 1106options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error));
GenerateFromMembers\GenerateConstructorFromMembers\GenerateConstructorFromMembersTests.cs (1)
556""", options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error));
MisplacedUsingDirectivesTests.cs (2)
39new(AddImportPlacement.InsideNamespace, NotificationOption2.Error); 42new(AddImportPlacement.OutsideNamespace, NotificationOption2.Error);
QualifyMemberAccessTests.cs (3)
31=> TestAsyncWithOptionAndNotificationOption(code, expected, option, NotificationOption2.Error); 37=> TestMissingAsyncWithOptionAndNotificationOption(code, option, NotificationOption2.Error); 1615CodeStyleOptions2.QualifyPropertyAccess, NotificationOption2.Error);
SimplifyTypeNames\SimplifyTypeNamesTests.cs (13)
4461""", new TestParameters(options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error))); 4601""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.Error))); 4648""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.Error))); 4692""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.Error))); 4749""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.Error))); 4766""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.Error))); 4783""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.Error))); 4874""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.Error))); 4889""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.Error))); 7113{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, true, NotificationOption2.Error }, 7120{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, true, NotificationOption2.Error }, 7127{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, true, NotificationOption2.Error }, 7141private readonly CodeStyleOption2<bool> onWithError = new CodeStyleOption2<bool>(true, NotificationOption2.Error);
Squiggles\ErrorSquiggleProducerTests.cs (1)
124new CodeStyleOption2<bool>(value: true, notification: NotificationOption2.Error));
UseExplicitTypeTests.cs (1)
35private readonly CodeStyleOption2<bool> offWithError = new(false, NotificationOption2.Error);
UseExpressionBodyForMethodsAnalyzerTests.cs (1)
72Assert.Equal(NotificationOption2.Error, option.Notification);
UseImplicitTypeTests.cs (1)
36private static readonly CodeStyleOption2<bool> onWithError = new(true, NotificationOption2.Error);
UseVarTestExtensions.cs (2)
27private static readonly CodeStyleOption2<bool> offWithError = new CodeStyleOption2<bool>(false, NotificationOption2.Error); 28private static readonly CodeStyleOption2<bool> onWithError = new CodeStyleOption2<bool>(true, NotificationOption2.Error);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeStyle\CSharpEditorConfigCodeStyleParserTests.cs (2)
57var defaultValue = new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.Never, NotificationOption2.Error); 73var defaultValue = new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.InsideNamespace, NotificationOption2.Error);
Microsoft.CodeAnalysis.EditorFeatures (1)
EditorConfigSettings\Data\CodeStyleSetting.cs (1)
42DiagnosticSeverity.Error => NotificationOption2.Error,
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (7)
Simplification\TypeNameSimplifierTest.vb (7)
2503{CodeStyleOptions2.QualifyFieldAccess, New CodeStyleOption2(Of Boolean)(True, NotificationOption2.Error)} 3239Await TestAsync(input, expected, QualifyPropertyAccessOptionWithNotification(LanguageNames.CSharp, NotificationOption2.Error)) 5766Await TestAsync(input, expected, QualifyPropertyAccessOptionWithNotification(LanguageNames.VisualBasic, NotificationOption2.Error)) 5878Return New OptionsCollection(languageName) From {{CodeStyleOptions2.QualifyFieldAccess, New CodeStyleOption2(Of Boolean)(True, NotificationOption2.Error)}} 5882Return QualifyPropertyAccessOptionWithNotification(languageName, NotificationOption2.Error) 5886Return New OptionsCollection(languageName) From {{CodeStyleOptions2.QualifyMethodAccess, New CodeStyleOption2(Of Boolean)(True, NotificationOption2.Error)}} 5890Return New OptionsCollection(languageName) From {{CodeStyleOptions2.QualifyEventAccess, New CodeStyleOption2(Of Boolean)(True, NotificationOption2.Error)}}
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (19)
CodeActions\EncapsulateField\EncapsulateFieldTests.vb (2)
346{CodeStyleOptions2.QualifyFieldAccess, True, NotificationOption2.Error} 641{CodeStyleOptions2.QualifyFieldAccess, True, NotificationOption2.Error}
Diagnostics\GenerateType\GenerateTypeTests.vb (1)
1441options:=[Option](CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, False, NotificationOption2.Error))
QualifyMemberAccessTests.vb (3)
23Return TestAsyncWithOptionAndNotification(code, expected, opt, NotificationOption2.Error) 31Return TestMissingAsyncWithOptionAndNotification(code, opt, NotificationOption2.Error) 571CodeStyleOptions2.QualifyPropertyAccess, NotificationOption2.Error)
SimplifyThisOrMe\SimplifyThisOrMeTests.vb (1)
64options:=New OptionsCollection(GetLanguage()) From {{CodeStyleOptions2.QualifyPropertyAccess, False, NotificationOption2.Error}},
SimplifyTypeNames\SimplifyTypeNamesTests.vb (11)
30{CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, True, NotificationOption2.Error}, 39{CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, True, NotificationOption2.Error}, 48{CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, True, NotificationOption2.Error}, 53Private ReadOnly onWithError As New CodeStyleOption2(Of Boolean)(True, NotificationOption2.Error) 2136Await TestMissingInRegularAndScriptAsync(source.Value, New TestParameters(options:=[Option](CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, False, NotificationOption2.Error))) 2150Await TestMissingInRegularAndScriptAsync(source.Value, New TestParameters(options:=[Option](CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, False, NotificationOption2.Error))) 2164Await TestMissingInRegularAndScriptAsync(source.Value, New TestParameters(options:=[Option](CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, False, NotificationOption2.Error))) 2243Await TestMissingInRegularAndScriptAsync(source.Value, New TestParameters(options:=[Option](CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, False, NotificationOption2.Error))) 2257Await TestMissingInRegularAndScriptAsync(source.Value, New TestParameters(options:=[Option](CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, False, NotificationOption2.Error))) 2269Await TestMissingInRegularAndScriptAsync(source.Value, New TestParameters(options:=[Option](CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, False, NotificationOption2.Error))) 2300Await TestMissingInRegularAndScriptAsync(source.Value, New TestParameters(options:=[Option](CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, False, NotificationOption2.Error)))
Squiggles\ErrorSquiggleProducerTests.vb (1)
122CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, language, New CodeStyleOption2(Of Boolean)(value:=True, notification:=NotificationOption2.Error))
Microsoft.CodeAnalysis.Workspaces (6)
CodeStyle\NotificationOption.cs (2)
57/// <inheritdoc cref="NotificationOption2.Error"/> 58public static readonly NotificationOption Error = new(NotificationOption2.Error);
CodeStyleHelpers.cs (2)
58/// in <paramref name="value"/> and <see cref="NotificationOption2.Error"/> will be returned 109case EditorConfigSeverityStrings.Error: notification = NotificationOption2.Error; return true;
CodeStyleOption2`1.cs (1)
211DiagnosticSeverity.Error => NotificationOption2.Error,
ReportDiagnosticExtensions.cs (1)
89return NotificationOption2.Error;
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Options\OptionsTestHelpers.cs (2)
129.WithNotification((codeStyle.Notification == NotificationOption2.Error) ? NotificationOption2.Warning : NotificationOption2.Error),
Microsoft.CodeAnalysis.Workspaces.UnitTests (20)
Options\CodeStyleOptionTests.cs (11)
25var style = new CodeStyleOption2<int>(1, NotificationOption2.Error); 32var style = new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.WhenOnSingleLine, NotificationOption2.Error); 39var style = new CodeStyleOption2<string>("abc", NotificationOption2.Error); 47new CodeStyleOption2<bool>(true, NotificationOption2.Error).WithValue(false), 48new CodeStyleOption2<bool>(false, NotificationOption2.Error)); 55new CodeStyleOption2<int>(1, NotificationOption2.Error).WithValue(2), 56new CodeStyleOption2<int>(2, NotificationOption2.Error)); 63new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.Never, NotificationOption2.Error).WithValue(ExpressionBodyPreference.WhenPossible), 64new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.WhenPossible, NotificationOption2.Error)); 71new CodeStyleOption2<string>("abc", NotificationOption2.Error).WithValue("xyz"), 72new CodeStyleOption2<string>("xyz", NotificationOption2.Error));
Options\DocumentOptionSetTests.cs (2)
25new CodeStyleOption2<bool>(true, NotificationOption2.Error))); 53new CodeStyleOption2<bool>(true, NotificationOption2.Error)));
Remote\ServiceDescriptorTests.cs (7)
257QualifyFieldAccess = new CodeStyleOption2<bool>(true, NotificationOption2.Error) 263PreferExpressionBodiedIndexers = new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.WhenOnSingleLine, NotificationOption2.Error) 274AllowStatementImmediatelyAfterBlock = new CodeStyleOption2<bool>(true, NotificationOption2.Error), 275PreferConditionalDelegateCall = new CodeStyleOption2<bool>(false, NotificationOption2.Error) 285QualifyFieldAccess = new CodeStyleOption2<bool>(true, NotificationOption2.Error) 295AllowStatementImmediatelyAfterBlock = new CodeStyleOption2<bool>(false, NotificationOption2.Error), 296PreferredModifierOrder = new CodeStyleOption2<string>("Public Private", NotificationOption2.Error)
Microsoft.VisualStudio.LanguageServices.Implementation (3)
Options\Style\AbstractCodeStyleOptionViewModel.cs (1)
73new NotificationOptionViewModel(NotificationOption2.Error, KnownMonikers.StatusError)
Options\Style\NamingPreferences\NamingStyleOptionPageControl.xaml.cs (1)
47new NotificationOptionViewModel(NotificationOption2.Error, KnownMonikers.StatusError)
Options\Style\NamingPreferences\NamingStyleOptionPageViewModel.cs (1)
30new NotificationOptionViewModel(NotificationOption2.Error, KnownMonikers.StatusError)
Microsoft.VisualStudio.LanguageServices.UnitTests (2)
Options\BasicEditorConfigGeneratorTests.vb (1)
161options.SetOption(CodeStyleOptions2.PreferExplicitTupleNames, LanguageNames.VisualBasic, New CodeStyleOption2(Of Boolean)(False, NotificationOption2.[Error]))
Options\CSharpEditorConfigGeneratorTests.vb (1)
262options.SetOption(CodeStyleOptions2.PreferExplicitTupleNames, LanguageNames.CSharp, New CodeStyleOption2(Of Boolean)(False, NotificationOption2.[Error]))
Roslyn.VisualStudio.Next.UnitTests (1)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
120PreferNullPropagation = new CodeStyleOption2<bool>(true, NotificationOption2.Error)