100 references to WithArguments
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (66)
Compilation\CompilationAPITests.cs (66)
59
Diagnostic(ErrorCode.WRN_BadXMLRefSyntax, "x").
WithArguments
("x...y").WithLocation(2, 16),
62
Diagnostic(ErrorCode.WRN_ErrorOverride, "").
WithArguments
("Unexpected character '.'", "1056").WithLocation(2, 17));
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),
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)
217
Diagnostic(ErrorCode.WRN_UnreferencedFieldAssg, "_f").
WithArguments
("C._f").WithLocation(1, 17)
244
Diagnostic(ErrorCode.ERR_OptionMustBeAbsolutePath).
WithArguments
("CryptoKeyFile").WithLocation(1, 1),
265
Diagnostic(ErrorCode.ERR_OptionMustBeAbsolutePath).
WithArguments
("CryptoKeyFile").WithLocation(1, 1),
280
Diagnostic(ErrorCode.ERR_BadAssemblyName).
WithArguments
("Name contains invalid characters.").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));
433
Diagnostic(ErrorCode.ERR_InvalidHashAlgorithmName).
WithArguments
(""));
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),
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)
1013
Diagnostic(ErrorCode.ERR_MissingNetModuleReference).
WithArguments
("a1.netmodule"));
1083
Diagnostic(ErrorCode.ERR_MissingNetModuleReference).
WithArguments
("a1.netmodule"));
1157
assembly.VerifyEmitDiagnostics(Diagnostic(ErrorCode.ERR_NetModuleNameMustBeUnique).
WithArguments
("a1.netmodule"));
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));
1946
Diagnostic(ErrorCode.ERR_AmbiguousAttribute, "MyAttribute").
WithArguments
("MyAttribute", "MyAttribute2Attribute", "MyAttributeAttribute"));
1959
Diagnostic(ErrorCode.ERR_AmbiguousAttribute, "MyAttribute").
WithArguments
("MyAttribute", "MyAttribute2Attribute", "MyAttributeAttribute"));
2222
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "C").
WithArguments
("C"));
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));
2451
Diagnostic(ErrorCode.ERR_NoImplicitConv, @"""x""").
WithArguments
("string", "int"));
3125
Diagnostic(ErrorCode.ERR_AddModuleAssembly).
WithArguments
("<in-memory module>").WithLocation(1, 1));
3146
Diagnostic(ErrorCode.ERR_ImportNonAssembly).
WithArguments
("<in-memory assembly>").WithLocation(1, 1));
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));
3367
Diagnostic(ErrorCode.ERR_NoImplicitConv, @"""Who returns a string?""").
WithArguments
("string", "int").WithLocation(1, 8),
3447
Diagnostic(ErrorCode.ERR_DuplicateNameInNS, "C").
WithArguments
("C", "N").WithLocation(3, 8 + accessibility.Length)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (22)
LexicalAndXml\LexicalTests.cs (7)
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),
364
TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).
WithArguments
("@").WithLocation(1, 1),
386
TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).
WithArguments
("@").WithLocation(1, 1),
431
TestBase.Diagnostic(ErrorCode.ERR_UnexpectedCharacter).
WithArguments
("@").WithLocation(1, 1));
Parsing\StatementParsingTests.cs (1)
3465
CSharpTestBase.Diagnostic(ErrorCode.ERR_SyntaxError, "if").
WithArguments
("when").WithLocation(7, 36));
Syntax\SyntaxTreeTests.cs (14)
367
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").
WithArguments
("global using directive", "10.0").WithLocation(1, 1),
373
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").
WithArguments
("ns1").WithLocation(1, 14));
439
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").
WithArguments
("global using directive", "10.0").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),
515
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").
WithArguments
("ns1").WithLocation(1, 21));
583
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").
WithArguments
("global using directive", "10.0").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),
667
Diagnostic(ErrorCode.WRN_LowerCaseTypeName, "alias").
WithArguments
("alias").WithLocation(1, 14),
670
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "ns1").
WithArguments
("ns1").WithLocation(1, 22));
752
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "global").
WithArguments
("global using directive", "10.0").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));
Microsoft.CodeAnalysis.UnitTests (12)
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 (4)
103
.
WithArguments
(
115
.
WithArguments
(
127
.
WithArguments
(
162
.
WithArguments
(