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); 828AssertEx.AssertEqualToleratingWhitespaceDifferences($@"{initFile.Path}(1,3): error CS1002: {CSharpResources.ERR_SemicolonExpected} 866AssertEx.AssertEqualToleratingWhitespaceDifferences($@"(1,8): error CS0234: {string.Format(CSharpResources.ERR_DottedTypeNameNotFoundInNS, "Missing", "Microsoft")}",
Microsoft.CodeAnalysis.CSharp (52)
Binder\LookupOptions.cs (1)
169throw new ArgumentException(CSharpResources.LookupOptionsHasInvalidCombo);
CommandLine\CSharpCompiler.cs (1)
366CSharpResources.CouldNotFindFile));
Compilation\CSharpCompilation.cs (19)
857throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, $"{nameof(trees)}[{i}]"); 862throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, $"{nameof(trees)}[{i}]"); 867throw new ArgumentException(CSharpResources.SubmissionCanOnlyInclude, $"{nameof(trees)}[{i}]"); 879throw new ArgumentException(CSharpResources.SubmissionCanHaveAtMostOne, nameof(trees)); 930throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, $"{nameof(trees)}[{i}]"); 933throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, $"{nameof(trees)}[{i}]"); 987throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, nameof(newTree)); 998throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, nameof(oldTree)); 1001throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, nameof(oldTree)); 1006throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, nameof(newTree)); 2266throw new ArgumentException(CSharpResources.SyntaxTreeNotFound, nameof(syntaxTree)); 3759throw new ArgumentException(string.Format(CSharpResources.NotSameNumberParameterTypesAndRefKinds, parameterTypes.Length, parameterRefKinds.Length)); 3765throw new ArgumentException(CSharpResources.OutIsNotValidForReturn); 3770throw new ArgumentException(string.Format(CSharpResources.CallingConventionTypesRequireUnmanaged, nameof(callingConventionTypes), nameof(callingConvention))); 3805throw new ArgumentException(string.Format(CSharpResources.CallingConventionTypeIsInvalid, type.ToDisplayString())); 4275throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4293throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4314throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4340throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter));
Compilation\CSharpCompilationReference.cs (1)
56return CSharpResources.CompilationC + this.Compilation.AssemblyName;
Compilation\CSharpSemanticModel.cs (4)
1303string.Format(CSharpResources.PositionIsNotWithinSyntax, Root.FullSpan)); 1369throw new ArgumentException(CSharpResources.SyntaxNodeIsNotWithinSynt); 1383throw new InvalidOperationException(CSharpResources.ChainingSpeculativeModelIsNotSupported); 1388throw new ArgumentException(CSharpResources.SpeculatedSyntaxNodeCannotBelongToCurrentCompilation);
Compilation\SyntaxAndDeclarationManager.cs (1)
213CSharpResources.CouldNotFindFile));
Compilation\SyntaxTreeSemanticModel.cs (1)
1700throw new ArgumentException(CSharpResources.InvalidGetDeclarationNameMultipleDeclarators);
CSharpExtensions.cs (3)
797throw new ArgumentException(string.Format(CSharpResources.IConversionExpressionIsNotCSharpConversion, 823throw new ArgumentException(string.Format(CSharpResources.ICompoundAssignmentOperationIsNotCSharpCompoundAssignment, 849throw new ArgumentException(string.Format(CSharpResources.ICompoundAssignmentOperationIsNotCSharpCompoundAssignment,
Emitter\Model\PEModuleBuilder.cs (1)
1111throw new InvalidOperationException(string.Format(CSharpResources.GenericParameterDefinition, param.Name));
Errors\ErrorFacts.cs (1)
190s_resourceManager = new System.Resources.ResourceManager(typeof(CSharpResources).FullName, typeof(ErrorCode).GetTypeInfo().Assembly);
Microsoft.CodeAnalysis.CSharp.CSharpResources.cs (1)
10internal static global::System.Resources.ResourceManager ResourceManager => s_resourceManager ?? (s_resourceManager = new global::System.Resources.ResourceManager(typeof(CSharpResources)));
SymbolDisplay\SymbolDisplay.cs (2)
218throw new ArgumentException(CSharpResources.SyntaxTreeSemanticModelMust); 222throw new ArgumentOutOfRangeException(CSharpResources.PositionNotWithinTree);
Symbols\MethodSymbol.cs (2)
861throw new ArgumentException(CSharpResources.TypeArgumentCannotBeNull, nameof(typeArguments)); 866throw new ArgumentException(CSharpResources.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\NamedTypeSymbol.cs (4)
1197throw new InvalidOperationException(CSharpResources.CannotCreateConstructedFromConstructed); 1202throw new InvalidOperationException(CSharpResources.CannotCreateConstructedFromNongeneric); 1212throw new ArgumentException(CSharpResources.TypeArgumentCannotBeNull, nameof(typeArguments)); 1217throw new ArgumentException(CSharpResources.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\PublicModel\Symbol.cs (1)
189throw new ArgumentException(CSharpResources.WrongSemanticModelType, LanguageNames.CSharp);
Symbols\ReferenceManager.cs (1)
90throw new NotSupportedException(string.Format(CSharpResources.CantReferenceCompilationOf, compilationReference.GetType(), "C#"));
Symbols\SymbolExtensions.cs (1)
386throw new ArgumentException(CSharpResources.NotACSharpSymbol, paramName);
Syntax\InternalSyntax\SyntaxToken.cs (2)
92throw new ArgumentException(string.Format(CSharpResources.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind)); 107throw new ArgumentException(string.Format(CSharpResources.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind));
Syntax\SyntaxFactory.cs (5)
252throw new ArgumentException(CSharpResources.UseVerbatimIdentifier, nameof(kind)); 255throw new ArgumentException(CSharpResources.UseLiteralForTokens, nameof(kind)); 258throw new ArgumentException(CSharpResources.UseLiteralForNumeric, nameof(kind)); 263throw new ArgumentException(string.Format(CSharpResources.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind)); 2311throw 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)
6310Assert.Contains(CSharpResources.NotACSharpSymbol, e.Message); 6327Assert.Contains(CSharpResources.NotACSharpSymbol, e.Message);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
728var 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}") }", 360new[] { $"(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)
668Assert.Equal($"error CS0012: {string.Format(CSharpResources.ERR_NoTypeDef, "MissingType", missingIdentity)}", errorMessage);
ReferencedModulesTests.cs (3)
897yield return "error CS0433: " + string.Format(CSharpResources.ERR_SameFullNameAggAgg, compilationA.Assembly.Identity, type, compilationB.Assembly.Identity); 898yield return "error CS0433: " + string.Format(CSharpResources.ERR_SameFullNameAggAgg, compilationB.Assembly.Identity, type, compilationA.Assembly.Identity); 915Assert.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}", 327var error = $@"error CS2001: {string.Format(CSharpResources.ERR_FileNotFound, Path.Combine(AppContext.BaseDirectory, "@arg1"))}"; 474var error = $@"error CS2001: {string.Format(CSharpResources.ERR_FileNotFound, Path.Combine(AppContext.BaseDirectory, "a + b"))}"; 528var 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)
27Diagnostic(ErrorCode.ERR_NoSourceFile, "\"\"").WithArguments("", CSharpResources.CouldNotFindFile).WithLocation(1, 7)); 40Diagnostic(ErrorCode.ERR_NoSourceFile, "\"missing\"").WithArguments("missing", CSharpResources.CouldNotFindFile).WithLocation(1, 7));
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1562var expectedMessage = "error CS8806: " + string.Format(CSharpResources.ERR_UnsupportedCallingConvention, "delegate* unmanaged[]<string>");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (3)
1837AssertEx.Equal(new[] { $"{document2.FilePath}: (0,30)-(0,32): Error CS0266: {string.Format(CSharpResources.ERR_NoImplicitConvCast, "long", "int")}" }, InspectDiagnostics(emitDiagnostics)); 2373AssertEx.Equal(new[] { $"{document2.FilePath}: (0,0)-(0,54): Error CS8055: {string.Format(CSharpResources.ERR_EncodinglessSyntaxTree)}" }, InspectDiagnostics(emitDiagnostics)); 2390AssertEx.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)
69Message=<%= String.Format(CSharpResources.ERR_InvalidMemberDecl, "}") %>/> 90Message=<%= String.Format(CSharpResources.ERR_InvalidMemberDecl, "}") %>/> 92Message=<%= String.Format(CSharpResources.ERR_InvalidMemberDecl, "}") %>/> 94Message=<%= String.Format(CSharpResources.ERR_InvalidMemberDecl, "}") %>/> 112Message=<%= String.Format(CSharpResources.ERR_NoImplicitConv, "string", "int") %>/> 133Message=<%= String.Format(CSharpResources.ERR_InvalidMemberDecl, "}") %>/> 135Message=<%= String.Format(CSharpResources.ERR_InvalidMemberDecl, "as") %>/> 137Message=<%= CSharpResources.WRN_IllegalPragma %>/> 139Message=<%= CSharpResources.WRN_LowercaseEllSuffix %>/> 161Message=<%= String.Format(CSharpResources.ERR_InvalidExprTerm, "}") %>/> 163Message=<%= CSharpResources.ERR_SemicolonExpected %>/> 196Message=<%= String.Format(CSharpResources.ERR_InvalidMemberDecl, "-") %>/> 198Message=<%= String.Format(CSharpResources.ERR_BadBinaryOps, "-", "int", "string") %>/> 231Message=<%= String.Format(CSharpResources.WRN_UnreferencedVarAssg, "a") %>/>