16 instantiations of NamedTypeAnalyzer
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (16)
Diagnostics\DiagnosticAnalyzerTests.cs (15)
3375
var namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.Symbol);
3390
namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.Symbol);
3399
namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.Symbol, configurable: false);
3418
var namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.SymbolStartEnd);
3434
namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.SymbolStartEnd, GeneratedCodeAnalysisFlags.Analyze);
3443
namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.SymbolStartEnd, GeneratedCodeAnalysisFlags.None);
3452
namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.SymbolStartEnd, configurable: false);
3471
var namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.CompilationStartEnd);
3486
namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.CompilationStartEnd, GeneratedCodeAnalysisFlags.Analyze);
3495
namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.CompilationStartEnd, GeneratedCodeAnalysisFlags.None);
3504
namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.CompilationStartEnd, configurable: false);
3522
var namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.Symbol);
3537
namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.Symbol);
3543
namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.Symbol, configurable: false);
3558
namedTypeAnalyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.Symbol);
Diagnostics\GetDiagnosticsTests.cs (1)
588
var analyzer = new
NamedTypeAnalyzer
(NamedTypeAnalyzer.AnalysisKind.Symbol, configurable: false);
49 references to NamedTypeAnalyzer
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (49)
Diagnostics\DiagnosticAnalyzerTests.cs (45)
3375
var
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.Symbol);
3378
Diagnostic(
NamedTypeAnalyzer
.RuleId, "A").WithArguments("A").WithLocation(1, 15),
3379
Diagnostic(
NamedTypeAnalyzer
.RuleId, "B").WithArguments("B").WithLocation(1, 33)
3386
new TestSyntaxTreeOptionsProvider(tree2, (
NamedTypeAnalyzer
.RuleId, ReportDiagnostic.Suppress)));
3390
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.Symbol);
3393
Diagnostic(
NamedTypeAnalyzer
.RuleId, "A").WithArguments("A").WithLocation(1, 15)
3399
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.Symbol, configurable: false);
3402
Diagnostic(
NamedTypeAnalyzer
.RuleId, "A").WithArguments("A").WithLocation(1, 15),
3403
Diagnostic(
NamedTypeAnalyzer
.RuleId, "B").WithArguments("B").WithLocation(1, 33)
3418
var
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.SymbolStartEnd);
3421
Diagnostic(
NamedTypeAnalyzer
.RuleId, "A").WithArguments("A").WithLocation(1, 15),
3422
Diagnostic(
NamedTypeAnalyzer
.RuleId, "B").WithArguments("B").WithLocation(1, 33)
3429
new TestSyntaxTreeOptionsProvider(tree2, (
NamedTypeAnalyzer
.RuleId, ReportDiagnostic.Suppress))
3434
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.SymbolStartEnd, GeneratedCodeAnalysisFlags.Analyze);
3437
Diagnostic(
NamedTypeAnalyzer
.RuleId, "A").WithArguments("A").WithLocation(1, 15)
3443
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.SymbolStartEnd, GeneratedCodeAnalysisFlags.None);
3446
Diagnostic(
NamedTypeAnalyzer
.RuleId, "A").WithArguments("A").WithLocation(1, 15)
3452
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.SymbolStartEnd, configurable: false);
3455
Diagnostic(
NamedTypeAnalyzer
.RuleId, "A").WithArguments("A").WithLocation(1, 15),
3456
Diagnostic(
NamedTypeAnalyzer
.RuleId, "B").WithArguments("B").WithLocation(1, 33)
3471
var
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.CompilationStartEnd);
3474
Diagnostic(
NamedTypeAnalyzer
.RuleId).WithArguments("A, B").WithLocation(1, 1)
3481
new TestSyntaxTreeOptionsProvider(tree2, (
NamedTypeAnalyzer
.RuleId, ReportDiagnostic.Suppress))
3486
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.CompilationStartEnd, GeneratedCodeAnalysisFlags.Analyze);
3489
Diagnostic(
NamedTypeAnalyzer
.RuleId).WithArguments("A, B").WithLocation(1, 1)
3495
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.CompilationStartEnd, GeneratedCodeAnalysisFlags.None);
3498
Diagnostic(
NamedTypeAnalyzer
.RuleId).WithArguments("A").WithLocation(1, 1)
3504
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.CompilationStartEnd, configurable: false);
3507
Diagnostic(
NamedTypeAnalyzer
.RuleId).WithArguments("A, B").WithLocation(1, 1)
3522
var
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.Symbol);
3525
Diagnostic(
NamedTypeAnalyzer
.RuleId, "A").WithArguments("A").WithLocation(1, 15),
3526
Diagnostic(
NamedTypeAnalyzer
.RuleId, "B").WithArguments("B").WithLocation(1, 33)
3533
new TestSyntaxTreeOptionsProvider((
NamedTypeAnalyzer
.RuleId, ReportDiagnostic.Suppress)));
3537
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.Symbol);
3543
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.Symbol, configurable: false);
3546
Diagnostic(
NamedTypeAnalyzer
.RuleId, "A").WithArguments("A").WithLocation(1, 15),
3547
Diagnostic(
NamedTypeAnalyzer
.RuleId, "B").WithArguments("B").WithLocation(1, 33)
3554
new TestSyntaxTreeOptionsProvider((
NamedTypeAnalyzer
.RuleId, ReportDiagnostic.Suppress), (tree1, new[] { (
NamedTypeAnalyzer
.RuleId, ReportDiagnostic.Default) })));
3558
namedTypeAnalyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.Symbol);
3561
Diagnostic(
NamedTypeAnalyzer
.RuleId, "A").WithArguments("A").WithLocation(1, 15)
Diagnostics\GetDiagnosticsTests.cs (4)
588
var
analyzer = new NamedTypeAnalyzer(
NamedTypeAnalyzer
.AnalysisKind.Symbol, configurable: false);
592
await verifyDiagnosticsAsync(compilation, analyzer, options: ($"dotnet_analyzer_diagnostic.category-{
NamedTypeAnalyzer
.RuleCategory}.severity", "none"));
617
var expected = Diagnostic(
NamedTypeAnalyzer
.RuleId, "C").WithArguments("C").WithLocation(1, 7);