136 references to CSharpResources
InteractiveHost.UnitTests (4)
InteractiveHostCoreInitTests.cs (1)
50
(1,1): error CS0006: {string.Format(
CSharpResources
.ERR_NoMetadataFile, scriptingAssemblyName)}", error);
InteractiveHostDesktopTests.cs (3)
749
@$"{initFile.Path}(1,1): error CS0006: {string.Format(
CSharpResources
.ERR_NoMetadataFile, "Assembly.dll")}", error);
827
AssertEx.AssertEqualToleratingWhitespaceDifferences($@"{initFile.Path}(1,3): error CS1002: {
CSharpResources
.ERR_SemicolonExpected}
865
AssertEx.AssertEqualToleratingWhitespaceDifferences($@"(1,8): error CS0234: {string.Format(
CSharpResources
.ERR_DottedTypeNameNotFoundInNS, "Missing", "Microsoft")}",
Microsoft.CodeAnalysis.CSharp (56)
artifacts\obj\Microsoft.CodeAnalysis.CSharp\Release\net10.0\Microsoft.CodeAnalysis.CSharp.CSharpResources.cs (1)
10
internal static global::System.Resources.ResourceManager ResourceManager => s_resourceManager ?? (s_resourceManager = new global::System.Resources.ResourceManager(typeof(
CSharpResources
)));
Binder\LookupOptions.cs (1)
171
throw new ArgumentException(
CSharpResources
.LookupOptionsHasInvalidCombo);
CommandLine\CSharpCompiler.cs (1)
367
CSharpResources
.CouldNotFindFile));
Compilation\CSharpCompilation.cs (19)
951
throw new ArgumentException(
CSharpResources
.TreeMustHaveARootNodeWith, $"{nameof(trees)}[{i}]");
956
throw new ArgumentException(
CSharpResources
.SyntaxTreeAlreadyPresent, $"{nameof(trees)}[{i}]");
961
throw new ArgumentException(
CSharpResources
.SubmissionCanOnlyInclude, $"{nameof(trees)}[{i}]");
973
throw new ArgumentException(
CSharpResources
.SubmissionCanHaveAtMostOne, nameof(trees));
1024
throw new ArgumentException(
CSharpResources
.SyntaxTreeFromLoadNoRemoveReplace, $"{nameof(trees)}[{i}]");
1027
throw new ArgumentException(
CSharpResources
.SyntaxTreeNotFoundToRemove, $"{nameof(trees)}[{i}]");
1081
throw new ArgumentException(
CSharpResources
.TreeMustHaveARootNodeWith, nameof(newTree));
1092
throw new ArgumentException(
CSharpResources
.SyntaxTreeFromLoadNoRemoveReplace, nameof(oldTree));
1095
throw new ArgumentException(
CSharpResources
.SyntaxTreeNotFoundToRemove, nameof(oldTree));
1100
throw new ArgumentException(
CSharpResources
.SyntaxTreeAlreadyPresent, nameof(newTree));
2620
throw new ArgumentException(
CSharpResources
.SyntaxTreeNotFound, nameof(syntaxTree));
4205
throw new ArgumentException(string.Format(
CSharpResources
.NotSameNumberParameterTypesAndRefKinds, parameterTypes.Length, parameterRefKinds.Length));
4211
throw new ArgumentException(
CSharpResources
.OutIsNotValidForReturn);
4216
throw new ArgumentException(string.Format(
CSharpResources
.CallingConventionTypesRequireUnmanaged, nameof(callingConventionTypes), nameof(callingConvention)));
4251
throw new ArgumentException(string.Format(
CSharpResources
.CallingConventionTypeIsInvalid, type.ToDisplayString()));
4721
throw new ArgumentException(
CSharpResources
.NoNoneSearchCriteria, nameof(filter));
4739
throw new ArgumentException(
CSharpResources
.NoNoneSearchCriteria, nameof(filter));
4760
throw new ArgumentException(
CSharpResources
.NoNoneSearchCriteria, nameof(filter));
4786
throw new ArgumentException(
CSharpResources
.NoNoneSearchCriteria, nameof(filter));
Compilation\CSharpCompilationReference.cs (1)
56
return
CSharpResources
.CompilationC + this.Compilation.AssemblyName;
Compilation\CSharpSemanticModel.cs (4)
1319
string.Format(
CSharpResources
.PositionIsNotWithinSyntax, Root.FullSpan));
1385
throw new ArgumentException(
CSharpResources
.SyntaxNodeIsNotWithinSynt);
1399
throw new InvalidOperationException(
CSharpResources
.ChainingSpeculativeModelIsNotSupported);
1404
throw new ArgumentException(
CSharpResources
.SpeculatedSyntaxNodeCannotBelongToCurrentCompilation);
Compilation\MemberSemanticModel.cs (2)
933
throw new ArgumentException(
CSharpResources
.NodeIsNotAwaitUsingDeclaration, nameof(node));
945
throw new ArgumentException(
CSharpResources
.NodeIsNotAwaitUsingStatement, nameof(node));
Compilation\SyntaxAndDeclarationManager.cs (1)
234
CSharpResources
.CouldNotFindFile));
Compilation\SyntaxTreeSemanticModel.cs (1)
1722
throw new ArgumentException(
CSharpResources
.InvalidGetDeclarationNameMultipleDeclarators);
CSharpExtensions.cs (4)
797
throw new ArgumentException(string.Format(
CSharpResources
.IConversionExpressionIsNotCSharpConversion,
823
throw new ArgumentException(string.Format(
CSharpResources
.ICompoundAssignmentOperationIsNotCSharpCompoundAssignment,
849
throw new ArgumentException(string.Format(
CSharpResources
.ICompoundAssignmentOperationIsNotCSharpCompoundAssignment,
874
throw new ArgumentException(string.Format(
CSharpResources
.ISpreadOperationIsNotCSharpSpread, nameof(spread)), nameof(spread));
Emitter\Model\PEModuleBuilder.cs (1)
1282
throw new InvalidOperationException(string.Format(
CSharpResources
.GenericParameterDefinition, param.Name));
Errors\ErrorFacts.cs (1)
194
s_resourceManager = new System.Resources.ResourceManager(typeof(
CSharpResources
).FullName, typeof(ErrorCode).GetTypeInfo().Assembly);
SymbolDisplay\SymbolDisplay.cs (2)
259
throw new ArgumentException(
CSharpResources
.SyntaxTreeSemanticModelMust);
263
throw new ArgumentOutOfRangeException(
CSharpResources
.PositionNotWithinTree);
Symbols\MethodSymbol.cs (2)
881
throw new ArgumentException(
CSharpResources
.TypeArgumentCannotBeNull, nameof(typeArguments));
886
throw new ArgumentException(
CSharpResources
.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\NamedTypeSymbol.cs (4)
1363
throw new InvalidOperationException(
CSharpResources
.CannotCreateConstructedFromConstructed);
1368
throw new InvalidOperationException(
CSharpResources
.CannotCreateConstructedFromNongeneric);
1378
throw new ArgumentException(
CSharpResources
.TypeArgumentCannotBeNull, nameof(typeArguments));
1383
throw new ArgumentException(
CSharpResources
.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\PublicModel\Symbol.cs (1)
189
throw new ArgumentException(
CSharpResources
.WrongSemanticModelType, LanguageNames.CSharp);
Symbols\ReferenceManager.cs (1)
89
throw new NotSupportedException(string.Format(
CSharpResources
.CantReferenceCompilationOf, compilationReference.GetType(), "C#"));
Symbols\SymbolExtensions.cs (1)
380
throw new ArgumentException(
CSharpResources
.NotACSharpSymbol, paramName);
Syntax\InternalSyntax\SyntaxToken.cs (2)
76
throw new ArgumentException(string.Format(
CSharpResources
.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind));
91
throw new ArgumentException(string.Format(
CSharpResources
.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind));
Syntax\ParameterSyntax.cs (1)
21
throw new System.ArgumentException(
CSharpResources
.ParameterRequiresTypeOrIdentifier);
Syntax\SyntaxFactory.cs (5)
252
throw new ArgumentException(
CSharpResources
.UseVerbatimIdentifier, nameof(kind));
255
throw new ArgumentException(
CSharpResources
.UseLiteralForTokens, nameof(kind));
258
throw new ArgumentException(
CSharpResources
.UseLiteralForNumeric, nameof(kind));
263
throw new ArgumentException(string.Format(
CSharpResources
.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind));
2371
throw new ArgumentException(
CSharpResources
.SyntaxTreeIsNotASubmission);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenTupleTest.cs (2)
6315
Assert.Contains(
CSharpResources
.NotACSharpSymbol, e.Message);
6332
Assert.Contains(
CSharpResources
.NotACSharpSymbol, e.Message);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
730
var message = string.Format("Add resource string named '{0}' for Title of '{1}' to '{2}'", missingResource, descriptor.Id, nameof(
CSharpResources
));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (44)
Diagnostics\Suppression\SuppressionTests.cs (44)
73
#pragma warning disable CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
75
#pragma warning restore CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
100
#pragma warning disable CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
103
#pragma warning restore CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
139
#pragma warning disable CS0612 // {{
CSharpResources
.WRN_DeprecatedSymbol_Title}}
143
#pragma warning restore CS0612 // {{
CSharpResources
.WRN_DeprecatedSymbol_Title}}
168
#pragma warning disable CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
171
#pragma warning restore CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
196
#pragma warning disable CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
199
#pragma warning restore CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
226
#pragma warning disable CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
229
#pragma warning restore CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
253
#pragma warning disable CS0628 // {{
CSharpResources
.WRN_ProtectedInSealed_Title}}
255
#pragma warning restore CS0628 // {{
CSharpResources
.WRN_ProtectedInSealed_Title}}
275
#pragma warning disable CS0628 // {{
CSharpResources
.WRN_ProtectedInSealed_Title}}
277
#pragma warning restore CS0628 // {{
CSharpResources
.WRN_ProtectedInSealed_Title}}
309
#pragma warning disable CS0612 // {{
CSharpResources
.WRN_DeprecatedSymbol_Title}}
313
#pragma warning restore CS0612 // {{
CSharpResources
.WRN_DeprecatedSymbol_Title}}
349
#pragma warning disable CS0612 // {{
CSharpResources
.WRN_DeprecatedSymbol_Title}}
354
#pragma warning restore CS0612 // {{
CSharpResources
.WRN_DeprecatedSymbol_Title}}
391
#pragma warning disable CS0612 // {{
CSharpResources
.WRN_DeprecatedSymbol_Title}}
396
#pragma warning restore CS0612 // {{
CSharpResources
.WRN_DeprecatedSymbol_Title}}
422
#pragma warning disable CS1574 // {{
CSharpResources
.WRN_BadXMLRef_Title}}
428
#pragma warning restore CS1574 // {{
CSharpResources
.WRN_BadXMLRef_Title}}
453
#pragma warning disable CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
455
#pragma warning restore CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
532
#pragma warning disable CS0162 // {{
CSharpResources
.WRN_UnreachableCode_Title}}
534
#pragma warning restore CS0162 // {{
CSharpResources
.WRN_UnreachableCode_Title}}
544
#pragma warning disable CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
546
#pragma warning restore CS0219 // {{
CSharpResources
.WRN_UnreferencedVarAssg_Title}}
574
#pragma warning disable CS0612 // {{
CSharpResources
.WRN_DeprecatedSymbol_Title}}
576
#pragma warning restore CS0612 // {{
CSharpResources
.WRN_DeprecatedSymbol_Title}}
606
#pragma warning disable CS1633 // {{
CSharpResources
.WRN_IllegalPragma_Title}}
614
#pragma warning restore CS1633 // {{
CSharpResources
.WRN_IllegalPragma_Title}}
626
#pragma warning disable CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
628
#pragma warning restore CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
636
#pragma warning disable CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
638
#pragma warning restore CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
655
#pragma warning disable CS1633 // {{
CSharpResources
.WRN_IllegalPragma_Title}}
658
#pragma warning restore CS1633 // {{
CSharpResources
.WRN_IllegalPragma_Title}}
674
#pragma warning disable CS1633 // {{
CSharpResources
.WRN_IllegalPragma_Title}}
677
#pragma warning restore CS1633 // {{
CSharpResources
.WRN_IllegalPragma_Title}}
693
#pragma warning disable CS1574 // {{
CSharpResources
.WRN_BadXMLRef_Title}}
696
#pragma warning restore CS1574 // {{
CSharpResources
.WRN_BadXMLRef_Title}}
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (3)
CsiTests.cs (3)
76
(1,7): error CS1504: {string.Format(
CSharpResources
.ERR_NoSourceFile, "a.csx",
CSharpResources
.CouldNotFindFile)}
77
(1,1): error CS0006: {string.Format(
CSharpResources
.ERR_NoMetadataFile, "C.dll")}
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (15)
CommandLineRunnerTests.cs (15)
249
var error = $@"error CS2001: {string.Format(
CSharpResources
.ERR_FileNotFound, Path.Combine(AppContext.BaseDirectory, "@arg1"))}";
396
var error = $@"error CS2001: {string.Format(
CSharpResources
.ERR_FileNotFound, Path.Combine(AppContext.BaseDirectory, "a + b"))}";
450
var error = $@"error CS0246: {string.Format(
CSharpResources
.ERR_SingleTypeNameNotFound, "Alpha")}";
465
(1,8): error CS0234: {string.Format(
CSharpResources
.ERR_DottedTypeNameNotFoundInNS, "Missing", "Microsoft")}
470
$"(1,8): error CS0234: {string.Format(
CSharpResources
.ERR_DottedTypeNameNotFoundInNS, "Missing", "Microsoft")}",
607
(1,7): error CS1504: {string.Format(
CSharpResources
.ERR_NoSourceFile, "a.csx",
CSharpResources
.CouldNotFindFile)}
617
$@"(1,7): error CS1504: {string.Format(
CSharpResources
.ERR_NoSourceFile, "a.csx",
CSharpResources
.CouldNotFindFile)}",
643
(1,1): error CS0006: {string.Format(
CSharpResources
.ERR_NoMetadataFile, "C.dll")}
653
$@"(1,1): error CS0006: {string.Format(
CSharpResources
.ERR_NoMetadataFile, "C.dll")}",
729
{init.Path}(2,3): error CS1002: {
CSharpResources
.ERR_SemicolonExpected}
737
$@"{init.Path}(2,3): error CS1002: {
CSharpResources
.ERR_SemicolonExpected}",
864
(1,58): warning CS0162: {
CSharpResources
.WRN_UnreachableCode}
873
$@"(1,58): warning CS0162: {
CSharpResources
.WRN_UnreachableCode}
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Compilation\LoadDirectiveTests.cs (2)
28
Diagnostic(ErrorCode.ERR_NoSourceFile, "\"\"").WithArguments("",
CSharpResources
.CouldNotFindFile).WithLocation(1, 7));
41
Diagnostic(ErrorCode.ERR_NoSourceFile, "\"missing\"").WithArguments("missing",
CSharpResources
.CouldNotFindFile).WithLocation(1, 7));
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1550
var expectedMessage = "error CS8806: " + string.Format(
CSharpResources
.ERR_UnsupportedCallingConvention, "delegate* unmanaged[]<string>");
Microsoft.CodeAnalysis.ExternalAccess.HotReload.UnitTests (3)
HotReloadServiceTests.cs (3)
117
[$"{sourceFileA.Path}: (0,72)-(0,73): Error CS1002: {
CSharpResources
.ERR_SemicolonExpected}"],
132
$"{sourceFileA.Path}: (0,21)-(0,28): Error CS0103: {string.Format(
CSharpResources
.ERR_NameNotInContext, "Unknown")}",
133
$"{sourceFileA.Path}: (0,51)-(0,52): Warning CS0219: {string.Format(
CSharpResources
.WRN_UnreferencedVarAssg, "x")}",
Microsoft.CodeAnalysis.Features.UnitTests (5)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (5)
2221
$"test: {document2.FilePath}: (1,6)-(1,12): Warning CS0105: {string.Format(
CSharpResources
.WRN_DuplicateUsing, "System")}",
2222
$"test: {document2.FilePath}: (3,30)-(3,32): Error CS0266: {string.Format(
CSharpResources
.ERR_NoImplicitConvCast, "long", "int")}",
3012
AssertEx.Equal([$"proj: <no location>: Error CS9346: {
CSharpResources
.ERR_EncUpdateRequiresEmittingExplicitInterfaceImplementationNotSupportedByTheRuntime}"], InspectDiagnostics(results.Diagnostics));
3044
AssertEx.Equal([$"proj: {document2.FilePath}: (0,0)-(0,54): Error CS8055: {string.Format(
CSharpResources
.ERR_EncodinglessSyntaxTree)}"], InspectDiagnostics(results.Diagnostics));
3061
AssertEx.Equal([$"proj: {document2.FilePath}: (0,0)-(0,54): Error CS8055: {string.Format(
CSharpResources
.ERR_EncodinglessSyntaxTree)}"], InspectDiagnostics(results.Diagnostics));