87 references to Error
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (21)
AddMissingImports\CSharpAddMissingImportsRefactoringProviderTests.cs (2)
31new(AddImportPlacement.InsideNamespace, NotificationOption2.Error); 34new(AddImportPlacement.InsideNamespace, NotificationOption2.Error);
CodeActions\GenerateType\GenerateTypeTests.cs (5)
2949options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error)); 3247options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error)); 3330options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error)); 3362options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.Error)); 3680parameters: new TestParameters(options: Option(CSharpCodeStyleOptions.PreferredUsingDirectivePlacement, AddImportPlacement.InsideNamespace, NotificationOption2.Error)));
EventHookup\EventHookupCommandHandlerTests.cs (1)
926using var testState = EventHookupTestState.CreateTestState(markup, QualifyMethodAccessWithNotification(NotificationOption2.Error));
Formatting\CodeCleanupTests.cs (2)
875new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.InsideNamespace, NotificationOption2.Error); 878new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.OutsideNamespace, NotificationOption2.Error);
Formatting\CSharpNewDocumentFormattingServiceTests.cs (10)
55{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.Error) } 77{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.Error) } 99{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.Error) } 124{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.BlockScoped, NotificationOption2.Error) } 140{ CSharpCodeStyleOptions.PreferredUsingDirectivePlacement, new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.OutsideNamespace, NotificationOption2.Error) } 191{ CodeStyleOptions2.AccessibilityModifiersRequired, new CodeStyleOption2<AccessibilityModifiersRequired>(AccessibilityModifiersRequired.Always, NotificationOption2.Error) } 216{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.Error) }, 217{ CodeStyleOptions2.AccessibilityModifiersRequired, new CodeStyleOption2<AccessibilityModifiersRequired>(AccessibilityModifiersRequired.Always, NotificationOption2.Error) } 261{ CodeStyleOptions2.AccessibilityModifiersRequired, new CodeStyleOption2<AccessibilityModifiersRequired>(AccessibilityModifiersRequired.Always, NotificationOption2.Error) } 281{ CSharpCodeStyleOptions.PreferredUsingDirectivePlacement, new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.InsideNamespace, NotificationOption2.Error) }
GenerateConstructors\GenerateConstructorsTests.cs (1)
520""", options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (34)
EncapsulateField\EncapsulateFieldTests.cs (2)
1254""", options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error)); 1283""", options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error));
ExtractClass\ExtractClassTests.cs (1)
1217{ CSharpCodeStyleOptions.NamespaceDeclarations, NamespaceDeclarationPreference.FileScoped, NotificationOption2.Error },
SimplifyTypeNames\SimplifyTypeNamesTests.cs (13)
4151""", new TestParameters(options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error))); 4279""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.Error))); 4322""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.Error))); 4362""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.Error))); 4413""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.Error))); 4428""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.Error))); 4443""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.Error))); 4526""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.Error))); 4539""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.Error))); 6894{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, true, NotificationOption2.Error }, 6901{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, true, NotificationOption2.Error }, 6908{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, true, NotificationOption2.Error }, 6922private readonly CodeStyleOption2<bool> onWithError = new(true, NotificationOption2.Error);
src\Analyzers\CSharp\Tests\GenerateConstructor\GenerateConstructorTests.cs (5)
528options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error)); 663options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.Error)); 831options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error)); 966options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error)); 1055options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error));
src\Analyzers\CSharp\Tests\MisplacedUsingDirectives\MisplacedUsingDirectivesTests.cs (3)
36new(AddImportPlacement.InsideNamespace, NotificationOption2.Error); 39new(AddImportPlacement.OutsideNamespace, NotificationOption2.Error); 42new(AddImportPlacement.OutsideNamespaceIgnoringAliases, NotificationOption2.Error);
src\Analyzers\CSharp\Tests\QualifyMemberAccess\QualifyMemberAccessTests.cs (3)
31=> TestAsyncWithOptionAndNotificationOption(code, expected, option, NotificationOption2.Error); 37=> TestMissingAsyncWithOptionAndNotificationOption(code, option, NotificationOption2.Error); 1492CodeStyleOptions2.QualifyPropertyAccess, NotificationOption2.Error);
src\Analyzers\CSharp\Tests\UseAutoProperty\UseAutoPropertyTests.cs (2)
3031options: Option(CodeStyleOptions2.QualifyPropertyAccess, false, NotificationOption2.Error)); 3060options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.Error));
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForMethodsAnalyzerTests.cs (1)
68Assert.Equal(NotificationOption2.Error.WithIsExplicitlySpecified(true), option.Notification);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseExplicitTypeTests.cs (1)
31private readonly CodeStyleOption2<bool> offWithError = new(false, NotificationOption2.Error);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (1)
32private static readonly CodeStyleOption2<bool> onWithError = new(true, NotificationOption2.Error);
src\Analyzers\CSharp\Tests\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)
41ReportDiagnostic.Error => NotificationOption2.Error,
Microsoft.CodeAnalysis.Workspaces (9)
CodeStyle\NotificationOption.cs (2)
54/// <inheritdoc cref="NotificationOption2.Error"/> 55public static readonly NotificationOption Error = new(NotificationOption2.Error);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (2)
59/// in <paramref name="value"/> and <see cref="NotificationOption2.Error"/> will be returned 111case EditorConfigSeverityStrings.Error: notification = NotificationOption2.Error; return true;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
195DiagnosticSeverity.Error => NotificationOption2.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (2)
49ReportDiagnostic.Error => Error, 60DiagnosticSeverity.Error => Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
15DiagnosticSeverity.Error => NotificationOption2.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (1)
30ReportDiagnostic.Error => NotificationOption2.Error,
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (4)
Options\OptionsTestHelpers.cs (4)
129.WithNotification((codeStyle.Notification == NotificationOption2.Error) ? NotificationOption2.Warning : NotificationOption2.Error), 132.WithNotification((codeStyle.Notification == NotificationOption2.Error) ? NotificationOption2.Warning : NotificationOption2.Error),
Microsoft.CodeAnalysis.Workspaces.UnitTests (16)
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)
23new CodeStyleOption2<bool>(true, NotificationOption2.Error))); 53new CodeStyleOption2<bool>(true, NotificationOption2.Error)));
Remote\ServiceDescriptorTests.cs (3)
248QualifyFieldAccess = new CodeStyleOption2<bool>(true, NotificationOption2.Error) 254PreferExpressionBodiedIndexers = new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.WhenOnSingleLine, NotificationOption2.Error) 270QualifyFieldAccess = new CodeStyleOption2<bool>(true, NotificationOption2.Error)