226 references to WithLocation
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (5)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (5)
1230
Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p1").
WithLocation
(5, 15),
1231
Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p2").
WithLocation
(5, 23),
1232
Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p3").
WithLocation
(13, 23),
1233
Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p4").
WithLocation
(13, 31),
1234
Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p5").
WithLocation
(19, 17));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (5)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (5)
1230
Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p1").
WithLocation
(5, 15),
1231
Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p2").
WithLocation
(5, 23),
1232
Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p3").
WithLocation
(13, 23),
1233
Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p4").
WithLocation
(13, 31),
1234
Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId, "p5").
WithLocation
(19, 17));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (82)
Compilation\CompilationAPITests.cs (81)
59
Diagnostic(ErrorCode.WRN_BadXMLRefSyntax, "x").WithArguments("x...y").
WithLocation
(2, 16),
62
Diagnostic(ErrorCode.WRN_ErrorOverride, "").WithArguments("Unexpected character '.'", "1056").
WithLocation
(2, 17));
84
Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").
WithLocation
(1, 22));
96
Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").
WithLocation
(1, 22),
99
Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").
WithLocation
(1, 16));
106
Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").
WithLocation
(1, 16));
124
Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").
WithLocation
(4, 6));
132
Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").
WithLocation
(4, 6));
145
Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").
WithLocation
(1, 16)
156
Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").
WithLocation
(1, 16),
159
Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").
WithLocation
(1, 22).WithWarningAsError(true));
178
Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").
WithLocation
(1, 23).WithWarningAsError(true),
181
Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("D._f").
WithLocation
(1, 17),
184
Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").
WithLocation
(1, 17)
201
Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").
WithLocation
(1, 17)
214
Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").
WithLocation
(1, 23),
217
Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").WithArguments("C._f").
WithLocation
(1, 17)
228
Diagnostic(ErrorCode.WRN_LowercaseEllSuffix, "l").
WithLocation
(1, 39)
244
Diagnostic(ErrorCode.ERR_OptionMustBeAbsolutePath).WithArguments("CryptoKeyFile").
WithLocation
(1, 1),
246
Diagnostic(ErrorCode.ERR_PublicSignButNoKey).
WithLocation
(1, 1)
256
Diagnostic(ErrorCode.ERR_PublicSignButNoKey).
WithLocation
(1, 1));
265
Diagnostic(ErrorCode.ERR_OptionMustBeAbsolutePath).WithArguments("CryptoKeyFile").
WithLocation
(1, 1),
267
Diagnostic(ErrorCode.ERR_PublicSignButNoKey).
WithLocation
(1, 1));
278
Diagnostic(ErrorCode.WRN_NoRuntimeMetadataVersion).
WithLocation
(1, 1),
280
Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").
WithLocation
(1, 1),
282
Diagnostic(ErrorCode.ERR_NoEntryPoint).
WithLocation
(1, 1)
286
Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").
WithLocation
(1, 1)
291
Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").
WithLocation
(1, 1)
295
Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").
WithLocation
(1, 1)
299
Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").
WithLocation
(1, 1)
303
Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name cannot start with whitespace.").
WithLocation
(1, 1)
307
Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").
WithLocation
(1, 1)
311
Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name cannot be empty.").
WithLocation
(1, 1)
315
Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name cannot start with whitespace.").
WithLocation
(1, 1)
319
Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").
WithLocation
(1, 1)
323
Diagnostic(ErrorCode.ERR_BadAssemblyName).WithArguments("Name contains invalid characters.").
WithLocation
(1, 1)
410
Diagnostic(ErrorCode.ERR_InvalidDebugInformationFormat).WithArguments("-1").
WithLocation
(1, 1),
412
Diagnostic(ErrorCode.ERR_InvalidOutputName).WithArguments("Name cannot start with whitespace.").
WithLocation
(1, 1),
414
Diagnostic(ErrorCode.ERR_InvalidFileAlignment).WithArguments("513").
WithLocation
(1, 1),
416
Diagnostic(ErrorCode.ERR_InvalidSubsystemVersion).WithArguments("1000000.-1000000").
WithLocation
(1, 1),
418
Diagnostic(ErrorCode.ERR_InvalidHashAlgorithmName).WithArguments("invalid hash algorithm name").
WithLocation
(1, 1));
655
Diagnostic(ErrorCode.ERR_BadDirectivePlacement, "#").
WithLocation
(1, 21),
658
Diagnostic(ErrorCode.ERR_CloseParenExpected, "").
WithLocation
(1, 61),
661
Diagnostic(ErrorCode.ERR_SemicolonExpected, "").
WithLocation
(1, 61),
664
Diagnostic(ErrorCode.ERR_LocalFunctionMissingBody, "Alias").WithArguments("Alias()").
WithLocation
(1, 14),
667
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "alias").WithArguments("alias").
WithLocation
(1, 8),
670
Diagnostic(ErrorCode.WRN_ExternMethodNoImplementation, "Alias").WithArguments("Alias()").
WithLocation
(1, 14),
673
Diagnostic(ErrorCode.WRN_UnreferencedLocalFunction, "Alias").WithArguments("Alias").
WithLocation
(1, 14)
723
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion6, "extern alias Alias(*#$@^%*&); class D : Alias(*#$@^%*&).C {}").WithArguments("top-level statements", "9.0").
WithLocation
(1, 1),
726
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion6, "extern").WithArguments("extern local functions", "9.0").
WithLocation
(1, 1),
729
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion6, "Alias").WithArguments("local functions", "7.0").
WithLocation
(1, 14),
732
Diagnostic(ErrorCode.ERR_BadDirectivePlacement, "#").
WithLocation
(1, 21),
735
Diagnostic(ErrorCode.ERR_CloseParenExpected, "").
WithLocation
(1, 61),
738
Diagnostic(ErrorCode.ERR_SemicolonExpected, "").
WithLocation
(1, 61),
741
Diagnostic(ErrorCode.ERR_LocalFunctionMissingBody, "Alias").WithArguments("Alias()").
WithLocation
(1, 14),
744
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "alias").WithArguments("alias").
WithLocation
(1, 8),
747
Diagnostic(ErrorCode.WRN_ExternMethodNoImplementation, "Alias").WithArguments("Alias()").
WithLocation
(1, 14),
750
Diagnostic(ErrorCode.WRN_UnreferencedLocalFunction, "Alias").WithArguments("Alias").
WithLocation
(1, 14)
1793
Diagnostic(ErrorCode.WRN_MainIgnored, "Main").WithArguments("A.Main()").
WithLocation
(4, 17));
1803
Diagnostic(ErrorCode.WRN_MainIgnored, "Main").WithArguments("A.Main()").
WithLocation
(4, 17));
1840
Diagnostic(ErrorCode.WRN_MainIgnored, "Main").WithArguments("A.Main()").
WithLocation
(4, 17));
1852
Diagnostic(ErrorCode.WRN_MainIgnored, "Main").WithArguments("A.Main()").
WithLocation
(4, 17));
1908
Diagnostic(ErrorCode.WRN_LowerCaseTypeName, "alias").WithArguments("alias").
WithLocation
(2, 7),
1911
Diagnostic(ErrorCode.ERR_DuplicateAlias, "using alias=alias;").WithArguments("alias").
WithLocation
(2, 1),
1914
Diagnostic(ErrorCode.ERR_AmbigContext, "alias").WithArguments("alias", "<global namespace>", "<global namespace>").
WithLocation
(3, 17));
2240
Diagnostic(ErrorCode.ERR_LinkedNetmoduleMetadataMustProvideFullPEImage).WithArguments("ModuleCS00").
WithLocation
(1, 1));
2262
Diagnostic(ErrorCode.ERR_DuplicateImport).WithArguments("System (net461)", "System.v5.0.5.0_silverlight.dll").
WithLocation
(1, 1));
2319
Diagnostic(ErrorCode.ERR_DuplicateImport).WithArguments("System (net461)", "System.v5.0.5.0_silverlight.dll").
WithLocation
(1, 1),
2322
Diagnostic(ErrorCode.ERR_MissingTypeInAssembly, "C.Goo").WithArguments("System.Runtime.Versioning.FrameworkName", "System").
WithLocation
(1, 52));
3125
Diagnostic(ErrorCode.ERR_AddModuleAssembly).WithArguments("<in-memory module>").
WithLocation
(1, 1));
3146
Diagnostic(ErrorCode.ERR_ImportNonAssembly).WithArguments("<in-memory assembly>").
WithLocation
(1, 1));
3183
Diagnostic(ErrorCode.ERR_ExpressionExpected, "").
WithLocation
(1, 7),
3186
Diagnostic(ErrorCode.ERR_SemicolonExpected, "").
WithLocation
(1, 7));
3214
Diagnostic(ErrorCode.ERR_SemicolonExpected, "").
WithLocation
(1, 10));
3229
Diagnostic(ErrorCode.ERR_NoImplicitConv, "await System.Threading.Tasks.Task.FromResult(42)").WithArguments("int", "System.Threading.Tasks.Task<int>").
WithLocation
(1, 8));
3240
Diagnostic(ErrorCode.ERR_BadAsyncReturnExpression, "System.Threading.Tasks.Task.FromResult(42)").WithArguments("int", "System.Threading.Tasks.Task<int>").
WithLocation
(1, 8));
3273
Diagnostic(ErrorCode.WRN_UnreachableCode, "System").
WithLocation
(6, 1));
3285
Diagnostic(ErrorCode.WRN_UnreachableCode, "System").
WithLocation
(6, 1));
3367
Diagnostic(ErrorCode.ERR_NoImplicitConv, @"""Who returns a string?""").WithArguments("string", "int").
WithLocation
(1, 8),
3370
Diagnostic(ErrorCode.WRN_UnreachableCode, "42").
WithLocation
(3, 1));
3447
Diagnostic(ErrorCode.ERR_DuplicateNameInNS, "C").WithArguments("C", "N").
WithLocation
(3, 8 + accessibility.Length)
Compilation\UsedAssembliesTests.cs (1)
225
allocateOutput(input, ref output)[i] = old.
WithLocation
(old.LocationLine, old.LocationCharacter + 7);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (56)
LexicalAndXml\LexicalTests.cs (15)
274
TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").
WithLocation
(1, 1));
298
TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").
WithLocation
(1, 1));
322
TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").
WithLocation
(1, 1));
342
TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").
WithLocation
(1, 1),
344
TestBase.Diagnostic(ErrorCode.ERR_OpenEndedComment).
WithLocation
(1, 1));
364
TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").
WithLocation
(1, 1),
366
TestBase.Diagnostic(ErrorCode.ERR_OpenEndedComment).
WithLocation
(1, 1));
386
TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").
WithLocation
(1, 1),
388
TestBase.Diagnostic(ErrorCode.ERR_OpenEndedComment).
WithLocation
(1, 1));
408
TestBase.Diagnostic(ErrorCode.ERR_OpenEndedComment).
WithLocation
(1, 1));
431
TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).WithArguments("@").
WithLocation
(1, 1));
456
TestBase.Diagnostic(ErrorCode.ERR_ExpectedVerbatimLiteral).
WithLocation
(1, 1));
483
TestBase.Diagnostic(ErrorCode.ERR_ExpectedVerbatimLiteral).
WithLocation
(1, 1));
517
TestBase.Diagnostic(ErrorCode.ERR_ExpectedVerbatimLiteral).
WithLocation
(1, 1));
575
TestBase.Diagnostic(ErrorCode.ERR_ExpectedVerbatimLiteral).
WithLocation
(1, 1));
Parsing\StatementParsingTests.cs (4)
3465
CSharpTestBase.Diagnostic(ErrorCode.ERR_SyntaxError, "if").WithArguments("when").
WithLocation
(7, 36));
3535
CSharpTestBase.Diagnostic(ErrorCode.ERR_CloseParenExpected, "").
WithLocation
(9, 10),
3538
CSharpTestBase.Diagnostic(ErrorCode.ERR_SemicolonExpected, "").
WithLocation
(9, 10),
3541
CSharpTestBase.Diagnostic(ErrorCode.ERR_RbraceExpected, "").
WithLocation
(9, 10));
Syntax\SyntaxNodeTests.cs (6)
364
TestBase.Diagnostic(ErrorCode.ERR_BadDirectivePlacement, "#").
WithLocation
(1, 17));
492
TestBase.Diagnostic(ErrorCode.ERR_BadDirectivePlacement, "#").
WithLocation
(1, 5),
495
TestBase.Diagnostic(ErrorCode.ERR_ExpressionExpected, "").
WithLocation
(1, 9),
498
TestBase.Diagnostic(ErrorCode.ERR_CloseParenExpected, "").
WithLocation
(1, 9),
501
TestBase.Diagnostic(ErrorCode.ERR_ExpressionExpected, "").
WithLocation
(1, 9),
504
TestBase.Diagnostic(ErrorCode.ERR_SemicolonExpected, "").
WithLocation
(1, 9));
Syntax\SyntaxTreeTests.cs (31)
367
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").
WithLocation
(1, 1),
370
Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using ns1;").
WithLocation
(1, 1),
373
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").
WithLocation
(1, 14));
436
Diagnostic(ErrorCode.ERR_GlobalUsingInNamespace, "global").
WithLocation
(1, 16),
439
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").
WithLocation
(1, 16),
442
Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using ns1;").
WithLocation
(1, 16),
445
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").
WithLocation
(1, 29));
509
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").
WithLocation
(1, 1),
512
Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using static ns1;").
WithLocation
(1, 1),
515
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").
WithLocation
(1, 21));
580
Diagnostic(ErrorCode.ERR_GlobalUsingInNamespace, "global").
WithLocation
(1, 16),
583
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").
WithLocation
(1, 16),
586
Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using static ns1;").
WithLocation
(1, 16),
589
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").
WithLocation
(1, 36));
661
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").
WithLocation
(1, 1),
664
Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using alias = ns1;").
WithLocation
(1, 1),
667
Diagnostic(ErrorCode.WRN_LowerCaseTypeName, "alias").WithArguments("alias").
WithLocation
(1, 14),
670
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").
WithLocation
(1, 22));
749
Diagnostic(ErrorCode.ERR_GlobalUsingInNamespace, "global").
WithLocation
(1, 16),
752
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").WithArguments("global using directive", "10.0").
WithLocation
(1, 16),
755
Diagnostic(ErrorCode.HDN_UnusedUsingDirective, "global using alias = ns1;").
WithLocation
(1, 16),
758
Diagnostic(ErrorCode.WRN_LowerCaseTypeName, "alias").WithArguments("alias").
WithLocation
(1, 29),
761
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").WithArguments("ns1").
WithLocation
(1, 37));
811
Diagnostic(ErrorCode.ERR_UsingAfterElements, "global using ns1;").
WithLocation
(3, 1)
842
Diagnostic(ErrorCode.ERR_ExternAfterElements, "extern").
WithLocation
(3, 1)
876
Diagnostic(ErrorCode.ERR_UsingAfterElements, "global using ns1;").
WithLocation
(5, 5)
951
Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "d").
WithLocation
(1, 1)
978
Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "d").
WithLocation
(1, 1)
1006
Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "p").
WithLocation
(1, 12)
1042
Diagnostic(ErrorCode.ERR_NamespaceUnexpected, "p").
WithLocation
(1, 19)
1083
Diagnostic(ErrorCode.ERR_UsingAfterElements, "global using ns1;").
WithLocation
(3, 1)
Microsoft.CodeAnalysis.Test.Utilities (62)
Diagnostics\SuppressMessageAttributeTests.cs (62)
498
Diagnostic("Token", "{").
WithLocation
(4, 1),
499
Diagnostic("Token", "class").
WithLocation
(7, 9),
500
Diagnostic("Token", "C").
WithLocation
(7, 15),
501
Diagnostic("Token", "{").
WithLocation
(7, 17),
502
Diagnostic("Token", "}").
WithLocation
(7, 18),
503
Diagnostic("Token", "}").
WithLocation
(9, 1));
520
Diagnostic("Token", "{").
WithLocation
(4, 1),
521
Diagnostic("Token", "}").
WithLocation
(9, 1));
537
Diagnostic("Token", "A").
WithLocation
(3, 11),
538
Diagnostic("Token", "Class").
WithLocation
(5, 9),
539
Diagnostic("Token", "C").
WithLocation
(5, 15),
540
Diagnostic("Token", "End").
WithLocation
(6, 9),
541
Diagnostic("Token", "Class").
WithLocation
(6, 13),
542
Diagnostic("Token", "End").
WithLocation
(8, 1));
558
Diagnostic("Token", "A").
WithLocation
(3, 11),
559
Diagnostic("Token", "End").
WithLocation
(8, 1));
573
diagnostics: Diagnostic("Comment", "' In root namespace").
WithLocation
(3, 1));
601
Diagnostic("Token", "{").
WithLocation
(5, 1),
602
Diagnostic("Token", "}").
WithLocation
(20, 1));
638
Diagnostic("Token", "N").
WithLocation
(4, 11),
639
Diagnostic("Token", "End").
WithLocation
(28, 1));
759
Diagnostic("Token", "{").
WithLocation
(5, 5),
760
Diagnostic("Token", "remove").
WithLocation
(8, 9));
799
Diagnostic("Token", "}").
WithLocation
(6, 14),
800
Diagnostic("Token", "}").
WithLocation
(9, 5));
866
Diagnostic("Token", "{").
WithLocation
(5, 1),
867
Diagnostic("Token", "}").
WithLocation
(15, 1));
892
Diagnostic("Token", "C").
WithLocation
(4, 7),
893
Diagnostic("Token", "End").
WithLocation
(17, 1));
912
Diagnostic("Token", "{").
WithLocation
(6, 5),
913
Diagnostic("Token", "set").
WithLocation
(9, 9));
934
Diagnostic("Token", "Integer").
WithLocation
(4, 28),
935
Diagnostic("Token", "Set").
WithLocation
(9, 9));
954
Diagnostic("Token", "{").
WithLocation
(6, 5),
955
Diagnostic("Token", "set").
WithLocation
(9, 9));
976
Diagnostic("Token", "Get").
WithLocation
(7, 13),
977
Diagnostic("Token", "End").
WithLocation
(12, 5));
996
Diagnostic("Token", ";").
WithLocation
(4, 10),
997
Diagnostic("Token", "}").
WithLocation
(11, 1));
1016
Diagnostic("Token", "{").
WithLocation
(6, 5),
1017
Diagnostic("Token", "set").
WithLocation
(9, 9));
1036
Diagnostic("Token", "}").
WithLocation
(7, 25),
1037
Diagnostic("Token", "}").
WithLocation
(10, 5));
1056
Diagnostic("Token", "{").
WithLocation
(5, 1),
1057
Diagnostic("Token", "}").
WithLocation
(11, 1));
1077
Diagnostic("Token", "C").
WithLocation
(4, 26),
1078
Diagnostic("Token", "End").
WithLocation
(12, 1));
1095
Diagnostic("Token", "{").
WithLocation
(3, 1),
1096
Diagnostic("Token", "}").
WithLocation
(9, 1));
1111
Diagnostic("Token", "C").
WithLocation
(2, 7),
1112
Diagnostic("Token", "End").
WithLocation
(7, 1));
1131
Diagnostic("Token", "{").
WithLocation
(8, 1),
1132
Diagnostic("Token", "}").
WithLocation
(11, 1));
1146
Diagnostic("Token", "C").
WithLocation
(2, 7),
1147
Diagnostic("Token", "End").
WithLocation
(6, 1));
1161
Diagnostic("Token", "{").
WithLocation
(3, 1),
1162
Diagnostic("Token", "}").
WithLocation
(6, 1));
1181
Diagnostic("Token", "{").
WithLocation
(3, 1),
1182
Diagnostic("Token", "}").
WithLocation
(11, 1));
1198
Diagnostic("Token", "C").
WithLocation
(2, 7),
1199
Diagnostic("Token", "End").
WithLocation
(8, 1));
1359
Diagnostic("TypeDeclaration", "C").
WithLocation
(9, 7));
Microsoft.CodeAnalysis.UnitTests (10)
Analyzers\AnalyzerConfigTests.cs (8)
1756
Diagnostic("MultipleGlobalAnalyzerKeys").WithArguments("option1", "Global Section", "/.globalconfig1, /.globalconfig2").
WithLocation
(1, 1)
1777
Diagnostic("MultipleGlobalAnalyzerKeys").WithArguments("option1", "/path/to/file1.cs", "/.globalconfig1, /.globalconfig2").
WithLocation
(1, 1)
1966
Diagnostic("MultipleGlobalAnalyzerKeys").WithArguments("option1", "/path/to/file1.cs", "/.globalconfig1, /.globalconfig2").
WithLocation
(1, 1)
1985
Diagnostic("MultipleGlobalAnalyzerKeys").WithArguments("option1", "Global Section", "/.globalconfig1, /.globalconfig2").
WithLocation
(1, 1)
2077
Diagnostic("InvalidSeverityInAnalyzerConfig").WithArguments("cs000", "foo", "<Global Config>").
WithLocation
(1, 1)
2081
Diagnostic("InvalidSeverityInAnalyzerConfig").WithArguments("cs001", "bar", "<Global Config>").
WithLocation
(1, 1)
2293
Diagnostic("InvalidGlobalSectionName", isSuppressed: false).WithArguments(sectionName, "/.editorconfig").
WithLocation
(1, 1)
2545
Diagnostic("MultipleGlobalAnalyzerKeys").WithArguments("option1", "Global Section", "/.globalconfig3, /.globalconfig4").
WithLocation
(1, 1)
Diagnostics\SuppressMessageAttributeCompilerTests.cs (2)
101
var baseDiagnostic = Diagnostic("AD0001", null).
WithLocation
(1, 1);
169
.
WithLocation
(1, 1);
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (6)
Parser\ParseDirectives.vb (6)
3216
New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).
WithLocation
(10, 15))
3222
New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).
WithLocation
(10, 15).WithWarningAsError(True))
3231
New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).
WithLocation
(10, 15).WithWarningAsError(True))
3323
New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).
WithLocation
(10, 15))
3329
New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).
WithLocation
(10, 15).WithWarningAsError(True))
3338
New Test.Utilities.DiagnosticDescription(expectedId, "As Long", Nothing, Nothing, Nothing, False, GetType(String)).
WithLocation
(10, 15).WithWarningAsError(True))