161 references to CSharpResources
InteractiveHost.UnitTests (4)
InteractiveHostCoreInitTests.cs (1)
49
(1,1): error CS0006: {string.Format(
CSharpResources
.ERR_NoMetadataFile, scriptingAssemblyName)}", error);
InteractiveHostDesktopTests.cs (3)
750
@$"{initFile.Path}(1,1): error CS0006: {string.Format(
CSharpResources
.ERR_NoMetadataFile, "Assembly.dll")}", error);
828
AssertEx.AssertEqualToleratingWhitespaceDifferences($@"{initFile.Path}(1,3): error CS1002: {
CSharpResources
.ERR_SemicolonExpected}
866
AssertEx.AssertEqualToleratingWhitespaceDifferences($@"(1,8): error CS0234: {string.Format(
CSharpResources
.ERR_DottedTypeNameNotFoundInNS, "Missing", "Microsoft")}",
Microsoft.CodeAnalysis.CSharp (52)
Binder\LookupOptions.cs (1)
169
throw new ArgumentException(
CSharpResources
.LookupOptionsHasInvalidCombo);
CommandLine\CSharpCompiler.cs (1)
366
CSharpResources
.CouldNotFindFile));
Compilation\CSharpCompilation.cs (19)
857
throw new ArgumentException(
CSharpResources
.TreeMustHaveARootNodeWith, $"{nameof(trees)}[{i}]");
862
throw new ArgumentException(
CSharpResources
.SyntaxTreeAlreadyPresent, $"{nameof(trees)}[{i}]");
867
throw new ArgumentException(
CSharpResources
.SubmissionCanOnlyInclude, $"{nameof(trees)}[{i}]");
879
throw new ArgumentException(
CSharpResources
.SubmissionCanHaveAtMostOne, nameof(trees));
930
throw new ArgumentException(
CSharpResources
.SyntaxTreeFromLoadNoRemoveReplace, $"{nameof(trees)}[{i}]");
933
throw new ArgumentException(
CSharpResources
.SyntaxTreeNotFoundToRemove, $"{nameof(trees)}[{i}]");
987
throw new ArgumentException(
CSharpResources
.TreeMustHaveARootNodeWith, nameof(newTree));
998
throw new ArgumentException(
CSharpResources
.SyntaxTreeFromLoadNoRemoveReplace, nameof(oldTree));
1001
throw new ArgumentException(
CSharpResources
.SyntaxTreeNotFoundToRemove, nameof(oldTree));
1006
throw new ArgumentException(
CSharpResources
.SyntaxTreeAlreadyPresent, nameof(newTree));
2266
throw new ArgumentException(
CSharpResources
.SyntaxTreeNotFound, nameof(syntaxTree));
3759
throw new ArgumentException(string.Format(
CSharpResources
.NotSameNumberParameterTypesAndRefKinds, parameterTypes.Length, parameterRefKinds.Length));
3765
throw new ArgumentException(
CSharpResources
.OutIsNotValidForReturn);
3770
throw new ArgumentException(string.Format(
CSharpResources
.CallingConventionTypesRequireUnmanaged, nameof(callingConventionTypes), nameof(callingConvention)));
3805
throw new ArgumentException(string.Format(
CSharpResources
.CallingConventionTypeIsInvalid, type.ToDisplayString()));
4275
throw new ArgumentException(
CSharpResources
.NoNoneSearchCriteria, nameof(filter));
4293
throw new ArgumentException(
CSharpResources
.NoNoneSearchCriteria, nameof(filter));
4314
throw new ArgumentException(
CSharpResources
.NoNoneSearchCriteria, nameof(filter));
4340
throw new ArgumentException(
CSharpResources
.NoNoneSearchCriteria, nameof(filter));
Compilation\CSharpCompilationReference.cs (1)
56
return
CSharpResources
.CompilationC + this.Compilation.AssemblyName;
Compilation\CSharpSemanticModel.cs (4)
1303
string.Format(
CSharpResources
.PositionIsNotWithinSyntax, Root.FullSpan));
1369
throw new ArgumentException(
CSharpResources
.SyntaxNodeIsNotWithinSynt);
1383
throw new InvalidOperationException(
CSharpResources
.ChainingSpeculativeModelIsNotSupported);
1388
throw new ArgumentException(
CSharpResources
.SpeculatedSyntaxNodeCannotBelongToCurrentCompilation);
Compilation\SyntaxAndDeclarationManager.cs (1)
213
CSharpResources
.CouldNotFindFile));
Compilation\SyntaxTreeSemanticModel.cs (1)
1700
throw new ArgumentException(
CSharpResources
.InvalidGetDeclarationNameMultipleDeclarators);
CSharpExtensions.cs (3)
797
throw new ArgumentException(string.Format(
CSharpResources
.IConversionExpressionIsNotCSharpConversion,
823
throw new ArgumentException(string.Format(
CSharpResources
.ICompoundAssignmentOperationIsNotCSharpCompoundAssignment,
849
throw new ArgumentException(string.Format(
CSharpResources
.ICompoundAssignmentOperationIsNotCSharpCompoundAssignment,
Emitter\Model\PEModuleBuilder.cs (1)
1111
throw new InvalidOperationException(string.Format(
CSharpResources
.GenericParameterDefinition, param.Name));
Errors\ErrorFacts.cs (1)
190
s_resourceManager = new System.Resources.ResourceManager(typeof(
CSharpResources
).FullName, typeof(ErrorCode).GetTypeInfo().Assembly);
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
)));
SymbolDisplay\SymbolDisplay.cs (2)
218
throw new ArgumentException(
CSharpResources
.SyntaxTreeSemanticModelMust);
222
throw new ArgumentOutOfRangeException(
CSharpResources
.PositionNotWithinTree);
Symbols\MethodSymbol.cs (2)
861
throw new ArgumentException(
CSharpResources
.TypeArgumentCannotBeNull, nameof(typeArguments));
866
throw new ArgumentException(
CSharpResources
.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\NamedTypeSymbol.cs (4)
1197
throw new InvalidOperationException(
CSharpResources
.CannotCreateConstructedFromConstructed);
1202
throw new InvalidOperationException(
CSharpResources
.CannotCreateConstructedFromNongeneric);
1212
throw new ArgumentException(
CSharpResources
.TypeArgumentCannotBeNull, nameof(typeArguments));
1217
throw new ArgumentException(
CSharpResources
.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\PublicModel\Symbol.cs (1)
189
throw new ArgumentException(
CSharpResources
.WrongSemanticModelType, LanguageNames.CSharp);
Symbols\ReferenceManager.cs (1)
90
throw new NotSupportedException(string.Format(
CSharpResources
.CantReferenceCompilationOf, compilationReference.GetType(), "C#"));
Symbols\SymbolExtensions.cs (1)
386
throw new ArgumentException(
CSharpResources
.NotACSharpSymbol, paramName);
Syntax\InternalSyntax\SyntaxToken.cs (2)
92
throw new ArgumentException(string.Format(
CSharpResources
.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind));
107
throw new ArgumentException(string.Format(
CSharpResources
.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind));
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));
2311
throw new ArgumentException(
CSharpResources
.SyntaxTreeIsNotASubmission);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (44)
Diagnostics\Suppression\SuppressionTests.cs (44)
71
#pragma warning disable CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
73
#pragma warning restore CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
96
#pragma warning disable CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
99
#pragma warning restore CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
133
#pragma warning disable CS0612 // {
CSharpResources
.WRN_DeprecatedSymbol_Title}
137
#pragma warning restore CS0612 // {
CSharpResources
.WRN_DeprecatedSymbol_Title}
160
#pragma warning disable CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
163
#pragma warning restore CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
186
#pragma warning disable CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
189
#pragma warning restore CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
214
#pragma warning disable CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
217
#pragma warning restore CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
239
#pragma warning disable CS0628 // {
CSharpResources
.WRN_ProtectedInSealed_Title}
241
#pragma warning restore CS0628 // {
CSharpResources
.WRN_ProtectedInSealed_Title}
259
#pragma warning disable CS0628 // {
CSharpResources
.WRN_ProtectedInSealed_Title}
261
#pragma warning restore CS0628 // {
CSharpResources
.WRN_ProtectedInSealed_Title}
291
#pragma warning disable CS0612 // {
CSharpResources
.WRN_DeprecatedSymbol_Title}
295
#pragma warning restore CS0612 // {
CSharpResources
.WRN_DeprecatedSymbol_Title}
329
#pragma warning disable CS0612 // {
CSharpResources
.WRN_DeprecatedSymbol_Title}
334
#pragma warning restore CS0612 // {
CSharpResources
.WRN_DeprecatedSymbol_Title}
369
#pragma warning disable CS0612 // {
CSharpResources
.WRN_DeprecatedSymbol_Title}
374
#pragma warning restore CS0612 // {
CSharpResources
.WRN_DeprecatedSymbol_Title}
398
#pragma warning disable CS1574 // {
CSharpResources
.WRN_BadXMLRef_Title}
404
#pragma warning restore CS1574 // {
CSharpResources
.WRN_BadXMLRef_Title}
427
#pragma warning disable CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
429
#pragma warning restore CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
504
#pragma warning disable CS0162 // {
CSharpResources
.WRN_UnreachableCode_Title}
506
#pragma warning restore CS0162 // {
CSharpResources
.WRN_UnreachableCode_Title}
516
$@"#pragma warning disable CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}
518
#pragma warning restore CS0219 // {
CSharpResources
.WRN_UnreferencedVarAssg_Title}");
544
#pragma warning disable CS0612 // {
CSharpResources
.WRN_DeprecatedSymbol_Title}
546
#pragma warning restore CS0612 // {
CSharpResources
.WRN_DeprecatedSymbol_Title}
574
#pragma warning disable CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
582
#pragma warning restore CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
594
$@"#pragma warning disable CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
596
#pragma warning restore CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}");
604
$@"#pragma warning disable CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
606
#pragma warning restore CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}");
621
#pragma warning disable CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
624
#pragma warning restore CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
638
#pragma warning disable CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
641
#pragma warning restore CS1633 // {
CSharpResources
.WRN_IllegalPragma_Title}
655
#pragma warning disable CS1574 // {
CSharpResources
.WRN_BadXMLRef_Title}
658
#pragma warning restore CS1574 // {
CSharpResources
.WRN_BadXMLRef_Title}
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenTupleTest.cs (2)
6310
Assert.Contains(
CSharpResources
.NotACSharpSymbol, e.Message);
6327
Assert.Contains(
CSharpResources
.NotACSharpSymbol, e.Message);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
728
var message = string.Format("Add resource string named '{0}' for Title of '{1}' to '{2}'", missingResource, descriptor.Id, nameof(
CSharpResources
));
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (18)
CompileExpressionsTests.cs (14)
166
$"(1,5): error CS1733: {
CSharpResources
.ERR_ExpressionExpected }",
167
$"(1,1): error CS1525: { string.Format(
CSharpResources
.ERR_InvalidExprTerm, "??") }",
207
$"(1,1): error CS0103: { string.Format(
CSharpResources
.ERR_NameNotInContext,"z") }",
208
$"(1,6): error CS0103: { string.Format(
CSharpResources
.ERR_NameNotInContext,"z") }",
241
$"error CS7013: { string.Format(
CSharpResources
.ERR_MetadataNameTooLong, $"<{longName}>i__Field") }",
242
$"error CS7013: { string.Format(
CSharpResources
.ERR_MetadataNameTooLong, $"<{longName}>j__TPar") }",
243
$"error CS7013: { string.Format(
CSharpResources
.ERR_MetadataNameTooLong, $"<{longName}>i__Field") }",
244
$"error CS7013: { string.Format(
CSharpResources
.ERR_MetadataNameTooLong, $"get_{longName}") }",
245
$"error CS7013: { string.Format(
CSharpResources
.ERR_MetadataNameTooLong, $"{longName}") }",
246
$"error CS7013: { string.Format(
CSharpResources
.ERR_MetadataNameTooLong, $"{longName}") }",
360
new[] { $"(1,11): error CS8185: {
CSharpResources
.ERR_DeclarationExpressionNotPermitted}" },
392
$"(1,1): error CS0103: { string.Format(
CSharpResources
.ERR_NameNotInContext, "$exception") }",
393
$"(1,1): error CS0103: { string.Format(
CSharpResources
.ERR_NameNotInContext, "$1") }",
394
$"(1,7): error CS0103: { string.Format(
CSharpResources
.ERR_NameNotInContext, "$unknown") }",
MissingAssemblyTests.cs (1)
668
Assert.Equal($"error CS0012: {string.Format(
CSharpResources
.ERR_NoTypeDef, "MissingType", missingIdentity)}", errorMessage);
ReferencedModulesTests.cs (3)
897
yield return "error CS0433: " + string.Format(
CSharpResources
.ERR_SameFullNameAggAgg, compilationA.Assembly.Identity, type, compilationB.Assembly.Identity);
898
yield return "error CS0433: " + string.Format(
CSharpResources
.ERR_SameFullNameAggAgg, compilationB.Assembly.Identity, type, compilationA.Assembly.Identity);
915
Assert.Equal($"error CS0121: {string.Format(
CSharpResources
.ERR_AmbigCall, "N.E.F(A)", "N.E.F(A)")}", errorMessage);
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (3)
CsiTests.cs (3)
75
(1,7): error CS1504: {string.Format(
CSharpResources
.ERR_NoSourceFile, "a.csx",
CSharpResources
.CouldNotFindFile)}
76
(1,1): error CS0006: {string.Format(
CSharpResources
.ERR_NoMetadataFile, "C.dll")}
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (17)
CommandLineRunnerTests.cs (17)
131
(1,19): warning CS1998: {
CSharpResources
.WRN_AsyncLacksAwaits}
140
$@"(1,19): warning CS1998: {
CSharpResources
.WRN_AsyncLacksAwaits}",
327
var error = $@"error CS2001: {string.Format(
CSharpResources
.ERR_FileNotFound, Path.Combine(AppContext.BaseDirectory, "@arg1"))}";
474
var error = $@"error CS2001: {string.Format(
CSharpResources
.ERR_FileNotFound, Path.Combine(AppContext.BaseDirectory, "a + b"))}";
528
var error = $@"error CS0246: {string.Format(
CSharpResources
.ERR_SingleTypeNameNotFound, "Alpha")}";
543
(1,8): error CS0234: {string.Format(
CSharpResources
.ERR_DottedTypeNameNotFoundInNS, "Missing", "Microsoft")}
548
$"(1,8): error CS0234: {string.Format(
CSharpResources
.ERR_DottedTypeNameNotFoundInNS, "Missing", "Microsoft")}",
685
(1,7): error CS1504: {string.Format(
CSharpResources
.ERR_NoSourceFile, "a.csx",
CSharpResources
.CouldNotFindFile)}
695
$@"(1,7): error CS1504: {string.Format(
CSharpResources
.ERR_NoSourceFile, "a.csx",
CSharpResources
.CouldNotFindFile)}",
721
(1,1): error CS0006: {string.Format(
CSharpResources
.ERR_NoMetadataFile, "C.dll")}
731
$@"(1,1): error CS0006: {string.Format(
CSharpResources
.ERR_NoMetadataFile, "C.dll")}",
807
{init.Path}(2,3): error CS1002: {
CSharpResources
.ERR_SemicolonExpected}
815
$@"{init.Path}(2,3): error CS1002: {
CSharpResources
.ERR_SemicolonExpected}",
942
(1,58): warning CS0162: {
CSharpResources
.WRN_UnreachableCode}
951
$@"(1,58): warning CS0162: {
CSharpResources
.WRN_UnreachableCode}
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Compilation\LoadDirectiveTests.cs (2)
27
Diagnostic(ErrorCode.ERR_NoSourceFile, "\"\"").WithArguments("",
CSharpResources
.CouldNotFindFile).WithLocation(1, 7));
40
Diagnostic(ErrorCode.ERR_NoSourceFile, "\"missing\"").WithArguments("missing",
CSharpResources
.CouldNotFindFile).WithLocation(1, 7));
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1562
var expectedMessage = "error CS8806: " + string.Format(
CSharpResources
.ERR_UnsupportedCallingConvention, "delegate* unmanaged[]<string>");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (3)
1837
AssertEx.Equal(new[] { $"{document2.FilePath}: (0,30)-(0,32): Error CS0266: {string.Format(
CSharpResources
.ERR_NoImplicitConvCast, "long", "int")}" }, InspectDiagnostics(emitDiagnostics));
2373
AssertEx.Equal(new[] { $"{document2.FilePath}: (0,0)-(0,54): Error CS8055: {string.Format(
CSharpResources
.ERR_EncodinglessSyntaxTree)}" }, InspectDiagnostics(emitDiagnostics));
2390
AssertEx.Equal(new[] { $"{document2.FilePath}: (0,0)-(0,54): Error CS8055: {string.Format(
CSharpResources
.ERR_EncodinglessSyntaxTree)}" }, InspectDiagnostics(emitDiagnostics));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (14)
Diagnostics\DiagnosticProviderTests.vb (14)
69
Message=<%= String.Format(
CSharpResources
.ERR_InvalidMemberDecl, "}") %>/>
90
Message=<%= String.Format(
CSharpResources
.ERR_InvalidMemberDecl, "}") %>/>
92
Message=<%= String.Format(
CSharpResources
.ERR_InvalidMemberDecl, "}") %>/>
94
Message=<%= String.Format(
CSharpResources
.ERR_InvalidMemberDecl, "}") %>/>
112
Message=<%= String.Format(
CSharpResources
.ERR_NoImplicitConv, "string", "int") %>/>
133
Message=<%= String.Format(
CSharpResources
.ERR_InvalidMemberDecl, "}") %>/>
135
Message=<%= String.Format(
CSharpResources
.ERR_InvalidMemberDecl, "as") %>/>
137
Message=<%=
CSharpResources
.WRN_IllegalPragma %>/>
139
Message=<%=
CSharpResources
.WRN_LowercaseEllSuffix %>/>
161
Message=<%= String.Format(
CSharpResources
.ERR_InvalidExprTerm, "}") %>/>
163
Message=<%=
CSharpResources
.ERR_SemicolonExpected %>/>
196
Message=<%= String.Format(
CSharpResources
.ERR_InvalidMemberDecl, "-") %>/>
198
Message=<%= String.Format(
CSharpResources
.ERR_BadBinaryOps, "-", "int", "string") %>/>
231
Message=<%= String.Format(
CSharpResources
.WRN_UnreferencedVarAssg, "a") %>/>