24 references to Create
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (14)
SourceGeneration\GeneratorDriverTests.cs (14)
1164
c.ReportDiagnostic(CSDiagnostic.
Create
("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 2));
1165
c.ReportDiagnostic(CSDiagnostic.
Create
("GEN002", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 3));
1215
var gen001 = CSDiagnostic.
Create
("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 2);
1286
var gen001 = CSDiagnostic.
Create
("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, isEnabledByDefault: true, warningLevel: 2);
3618
ctx.ReportDiagnostic(CodeAnalysis.Diagnostic.
Create
(
3651
ctx.ReportDiagnostic(CodeAnalysis.Diagnostic.
Create
(
3682
ctx.ReportDiagnostic(CodeAnalysis.Diagnostic.
Create
(
3712
ctx.ReportDiagnostic(CodeAnalysis.Diagnostic.
Create
(
3744
ctx.ReportDiagnostic(CodeAnalysis.Diagnostic.
Create
(
3776
ctx.ReportDiagnostic(CodeAnalysis.Diagnostic.
Create
(
3807
ctx.ReportDiagnostic(CodeAnalysis.Diagnostic.
Create
(
3836
ctx.ReportDiagnostic(CodeAnalysis.Diagnostic.
Create
(
3868
ctx.ReportDiagnostic(CodeAnalysis.Diagnostic.
Create
(
3898
ctx.ReportDiagnostic(CodeAnalysis.Diagnostic.
Create
(
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Diagnostics\LocationsTests.cs (3)
505
var diagnostic = CodeAnalysis.Diagnostic.
Create
("CS0000", "", "msg", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 1, location: location);
523
var diagnosticWithoutMapping = CodeAnalysis.Diagnostic.
Create
("CS0000", "", "msg", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 1, location: locationWithoutMapping);
526
var diagnosticWithMapping = CodeAnalysis.Diagnostic.
Create
("CS0000", "", "msg", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 1, location: locationWithMapping);
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
2370
var nonReportedDiagnostic = Diagnostic.
Create
(
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\SarifErrorLoggerTests.cs (1)
115
logger.LogDiagnostic(Diagnostic.
Create
(
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
SourceGeneration\GeneratorDriverTests.vb (4)
187
c.ReportDiagnostic(VBDiagnostic.
Create
("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, True, 2))
188
c.ReportDiagnostic(VBDiagnostic.
Create
("GEN002", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, True, 3))
221
Dim gen001 = VBDiagnostic.
Create
("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, True, 2)
253
Dim gen001 = VBDiagnostic.
Create
("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, True, 2)
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (1)
191
context.ReportDiagnostic(Diagnostic.
Create
("EV1", nameof(EnumValidationGenerator), $"Can't validate an enum that has no elements", DiagnosticSeverity.Error, DiagnosticSeverity.Error, true, 4));