Base:
622 references to ToString
Microsoft.Analyzers.Extra (2)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (2)
178var matchName = method.Identifier.ToString() == methodName; 225return (method.Identifier.ToString(), true);
Microsoft.CodeAnalysis (3)
DiagnosticAnalyzer\AnalysisContextInfo.cs (1)
134sb.Append(token.ToString());
Syntax\SyntaxToken.cs (2)
47return GetType().Name + " " + (Node != null ? Node.KindText : "None") + " " + ToString(); 153public string Text => ToString();
Microsoft.CodeAnalysis.CodeStyle (9)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
152node.GetFirstToken().ToString(),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
505_startToken.ToString().Replace("\r\n", "\\r\\n"), 506_endToken.ToString().Replace("\r\n", "\\r\\n"));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
321var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
137spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
897var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
138while (token != default && string.IsNullOrWhiteSpace(token.ToString()))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
166var tokenText = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
109if (!IsOnSingleLine(token.ToString()))
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
185target.GetLocation(), target.ToString(), (AttributeOwner.AllowedAttributeLocations & ~AttributeLocation.Method).ToDisplayString());
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
43=> token.ToString() == SyntaxFacts.GetText(kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
468return this.IsIdentifier(token) && !token.ContainsDiagnostics && token.ToString().Length == identifier.Length; 474return this.IsIdentifier(token) && !token.ContainsDiagnostics && token.ToString().Length == identifier.Length && token.IsVerbatimIdentifier();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (2)
131var tokenText = token.ToString(); 140var tokenText = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
142var numericText = numericToken.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
51syntaxToken.ToString(),
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (2)
224if (previousToken.Kind() == SyntaxKind.StringLiteralToken && previousToken.ToString().Last() != '"') 229if (previousToken.Kind() == SyntaxKind.CharacterLiteralToken && previousToken.ToString().Last() != '\'')
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTupleTest.cs (1)
25025Assert.Equal("x", x.Identifier.ToString());
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTestBase.cs (1)
118return ((VariableDeclaratorSyntax)node).Identifier.ToString();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Semantics\RecordTests.cs (4)
1817Assert.Equal("Main", main.Identifier.ToString()); 8131Assert.Equal("Main", main.Identifier.ToString()); 8631Assert.Equal("Main", main.Identifier.ToString()); 8736Assert.Equal("Main", main.Identifier.ToString());
Microsoft.CodeAnalysis.CSharp.Features (8)
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
341if (textTokens.Any(t => !string.IsNullOrWhiteSpace(t.ToString())))
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
108name: _methodName.ToString(),
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (2)
255var variableName = declaration.Declaration.Variables[0].Identifier.ToString(); 286var variableName = declaration.Declaration.Variables[0].Identifier.ToString();
Snippets\CSharpConstructorSnippetProvider.cs (1)
72containingTypeName: containingType.Identifier.ToString(),
Snippets\CSharpForEachLoopSnippetProvider.cs (1)
115arrayBuilder.Add(new SnippetPlaceholder(node.Identifier.ToString(), node.Identifier.SpanStart));
Structure\Providers\RegionDirectiveStructureProvider.cs (2)
24return simpleDirective.HashToken.ToString() + kw.ToString();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\LambdaDiscardParametersTests.cs (1)
68var underscores = tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Where(p => p.Identifier.ToString() == "_").ToArray();
Semantics\LookupPositionTests.cs (1)
3132position, token.ToString(), token.Parent.ToString(), keyPositionNum, KeyPositionMarker));
Semantics\RefFieldTests.cs (4)
16729Assert.Equal("r1", lambdas[0].ParameterList.Parameters[0].Identifier.ToString()); 16732Assert.Equal("t1", lambdas[0].ParameterList.Parameters[1].Identifier.ToString()); 16736Assert.Equal("r2", lambdas[1].ParameterList.Parameters[0].Identifier.ToString()); 16739Assert.Equal("t2", lambdas[1].ParameterList.Parameters[1].Identifier.ToString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
3866var node = (IdentifierNameSyntax)tree.GetCompilationUnitRoot().DescendantTokens().Where(t => t.ToString() == "Alias").Last().Parent;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (345)
IncrementalParsing\NodeValidators.cs (1)
65Assert.Equal(genericName.Identifier.ToString(), name);
LexicalAndXml\LexicalTests.cs (1)
513Assert.Equal("@: /*", token.ToString());
LexicalAndXml\PreprocessorTests.cs (1)
1687Assert.Equal("A", td.Identifier.ToString());
LexicalAndXml\XmlDocCommentTests.cs (45)
278Assert.Equal("x'y'z", attr.TextTokens[0].ToString()); 305Assert.Equal("x\"y\"z", attr.TextTokens[0].ToString()); 834Assert.Equal(" this is a test", cdata.TextTokens[0].ToString()); 835Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 836Assert.Equal(" of &some; cdata /// */ /**", cdata.TextTokens[2].ToString()); 837Assert.Equal(Environment.NewLine, cdata.TextTokens[3].ToString()); 838Assert.Equal(" \"']]<>/></text", cdata.TextTokens[4].ToString()); 865Assert.Equal(" this is a test", cdata.TextTokens[0].ToString()); 866Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 867Assert.Equal(" of &some; cdata", cdata.TextTokens[2].ToString()); 868Assert.Equal(Environment.NewLine, cdata.TextTokens[3].ToString()); 869Assert.Equal(" \"']]<>/></text", cdata.TextTokens[4].ToString()); 894Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 919Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 920Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 945Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 946Assert.Equal("\u0085", cdata.TextTokens[1].ToString()); 970Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 996Assert.Equal(" this is a test", comment.TextTokens[0].ToString()); 997Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 998Assert.Equal(" of &some; comment", comment.TextTokens[2].ToString()); 999Assert.Equal(Environment.NewLine, comment.TextTokens[3].ToString()); 1000Assert.Equal(" \"']]<>/></text", comment.TextTokens[4].ToString()); 1027Assert.Equal(" this is a test", comment.TextTokens[0].ToString()); 1028Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 1029Assert.Equal(" of &some; comment", comment.TextTokens[2].ToString()); 1030Assert.Equal(Environment.NewLine, comment.TextTokens[3].ToString()); 1031Assert.Equal(" \"']]<>/></text", comment.TextTokens[4].ToString()); 1056Assert.Equal(" incomplete", comment.TextTokens[0].ToString()); 1081Assert.Equal(" incomplete", comment.TextTokens[0].ToString()); 1082Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 1106Assert.Equal(" incomplete", comment.TextTokens[0].ToString()); 1134Assert.Equal(" this is a test", ProcessingInstruction.TextTokens[0].ToString()); 1135Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[1].ToString()); 1136Assert.Equal(" of &a; ProcessingInstruction /// */ /**", ProcessingInstruction.TextTokens[2].ToString()); 1137Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[3].ToString()); 1138Assert.Equal(" \"']]>/>?</text", ProcessingInstruction.TextTokens[4].ToString()); 1168Assert.Equal(" this is a test <!--", ProcessingInstruction.TextTokens[0].ToString()); 1169Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[1].ToString()); 1170Assert.Equal(" of &a; ProcessingInstruction", ProcessingInstruction.TextTokens[2].ToString()); 1171Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[3].ToString()); 1172Assert.Equal(" \"']]>/></text>]]>", ProcessingInstruction.TextTokens[4].ToString()); 1225Assert.Equal(" incomplete", ProcessingInstruction.TextTokens[0].ToString()); 1226Assert.Equal("\u0085", ProcessingInstruction.TextTokens[1].ToString()); 1252Assert.Equal(" incomplete", ProcessingInstruction.TextTokens[0].ToString());
Parsing\DeclarationParsingTests.cs (195)
47Assert.Equal("a", ea.Identifier.ToString()); 271Assert.Equal("assembly", ad.Target.Identifier.ToString()); 297Assert.Equal("@assembly", ad.Target.Identifier.ToString()); 326Assert.Equal(@"as\u0073embly", ad.Target.Identifier.ToString()); 355Assert.Equal("module", ad.Target.Identifier.ToString()); 382Assert.Equal("@module", ad.Target.Identifier.ToString()); 410Assert.Equal("assembly", ad.Target.Identifier.ToString()); 440Assert.Equal("assembly", ad.Target.Identifier.ToString()); 471Assert.Equal("assembly", ad.Target.Identifier.ToString()); 507Assert.Equal("assembly", ad.Target.Identifier.ToString()); 538Assert.Equal("assembly", ad.Target.Identifier.ToString()); 550Assert.Equal("assembly", ad.Target.Identifier.ToString()); 787Assert.Equal("a", cs.Identifier.ToString()); 814Assert.Equal("a", cs.Identifier.ToString()); 841Assert.Equal("a", cs.Identifier.ToString()); 868Assert.Equal("a", cs.Identifier.ToString()); 895Assert.Equal("a", cs.Identifier.ToString()); 922Assert.Equal("a", cs.Identifier.ToString()); 949Assert.Equal("a", cs.Identifier.ToString()); 976Assert.Equal("a", cs.Identifier.ToString()); 1004Assert.Equal("a", cs.Identifier.ToString()); 1031Assert.Equal("a", cs.Identifier.ToString()); 1057Assert.Equal("a", cs.Identifier.ToString()); 1088Assert.Equal("a", cs.Identifier.ToString()); 1120Assert.Equal("a", cs.Identifier.ToString()); 1162Assert.Equal("a", cs.Identifier.ToString()); 1223Assert.Equal("a", cs.Identifier.ToString()); 1267Assert.Equal("a", cs.Identifier.ToString()); 1308Assert.Equal("a", cs.Identifier.ToString()); 1349Assert.Equal("a", cs.Identifier.ToString()); 1550Assert.Equal("a", cs.Identifier.ToString()); 1610Assert.Equal("a", cs.Identifier.ToString()); 1637Assert.Equal("A", cs.Identifier.ToString()); 1640Assert.Equal("B", gn.Parameters[0].Identifier.ToString()); 1668Assert.Equal("A", cs.Identifier.ToString()); 1697Assert.Equal("a", cs.Identifier.ToString()); 1722Assert.Equal("a", cs.Identifier.ToString()); 1737Assert.Equal("b", cs.Identifier.ToString()); 1762Assert.Equal("a", cs.Identifier.ToString()); 1778Assert.Equal("b", cs.Identifier.ToString()); 1803Assert.Equal("a", cs.Identifier.ToString()); 1819Assert.Equal("b", cs.Identifier.ToString()); 1844Assert.Equal("a", cs.Identifier.ToString()); 1861Assert.Equal("b", cs.Identifier.ToString()); 1886Assert.Equal("a", cs.Identifier.ToString()); 1903Assert.Equal("b", cs.Identifier.ToString()); 1928Assert.Equal("a", cs.Identifier.ToString()); 1944Assert.Equal("b", cs.Identifier.ToString()); 1969Assert.Equal("a", cs.Identifier.ToString()); 1985Assert.Equal("b", cs.Identifier.ToString()); 2009Assert.Equal("b", ds.Identifier.ToString()); 2036Assert.Equal("b", ds.Identifier.ToString()); 2064Assert.Equal("b", ds.Identifier.ToString()); 2111Assert.Equal("b", ds.Identifier.ToString()); 2157Assert.Equal("b", ds.Identifier.ToString()); 2167Assert.Equal("c", ds.ParameterList.Parameters[0].Identifier.ToString()); 2192Assert.Equal("b", ds.Identifier.ToString()); 2202Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2227Assert.Equal("b", ds.Identifier.ToString()); 2237Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2244Assert.Equal("f", ds.ParameterList.Parameters[1].Identifier.ToString()); 2269Assert.Equal("b", ds.Identifier.ToString()); 2280Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2305Assert.Equal("b", ds.Identifier.ToString()); 2316Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2341Assert.Equal("b", ds.Identifier.ToString()); 2352Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2378Assert.Equal("b", ds.Identifier.ToString()); 2411Assert.Equal("b", ds.Identifier.ToString()); 2422Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2448Assert.Equal("a", cs.Identifier.ToString()); 2462Assert.Equal("c", ds.Identifier.ToString()); 2490Assert.Equal("a", cs.Identifier.ToString()); 2505Assert.Equal("X", ms.Identifier.ToString()); 2536Assert.Equal("a", cs.Identifier.ToString()); 2550Assert.Equal("X", ms.Identifier.ToString()); 2582Assert.Equal("a", cs.Identifier.ToString()); 2596Assert.Equal("X", ms.Identifier.ToString()); 2627Assert.Equal("a", cs.Identifier.ToString()); 2657Assert.Equal("a", cs.Identifier.ToString()); 2685Assert.Equal("a", cs.Identifier.ToString()); 2704Assert.Equal("X", ms.Identifier.ToString()); 2753Assert.Equal("a", cs.Identifier.ToString()); 2769Assert.Equal("M", ms.Identifier.ToString()); 2800Assert.Equal("a", structDecl.Identifier.ToString()); 2816Assert.Equal("M", ms.Identifier.ToString()); 2847Assert.Equal("a", structDecl.Identifier.ToString()); 2866Assert.Equal("M", ms.Identifier.ToString()); 2897Assert.Equal("a", structDecl.Identifier.ToString()); 2913Assert.Equal("M", propertySyntax.Identifier.ToString()); 2938Assert.Equal("a", structDecl.Identifier.ToString()); 2953Assert.Equal("P", propertySyntax.Identifier.ToString()); 2999Assert.Equal("a", cs.Identifier.ToString()); 3014Assert.Equal("X", ms.Identifier.ToString()); 3023Assert.Equal("d", ms.ParameterList.Parameters[0].Identifier.ToString()); 3051Assert.Equal("a", cs.Identifier.ToString()); 3066Assert.Equal("X", ms.Identifier.ToString()); 3077Assert.Equal("d", ms.ParameterList.Parameters[0].Identifier.ToString()); 3084Assert.Equal("f", ms.ParameterList.Parameters[1].Identifier.ToString()); 3112Assert.Equal("a", cs.Identifier.ToString()); 3127Assert.Equal("X", ms.Identifier.ToString()); 3139Assert.Equal("d", ms.ParameterList.Parameters[0].Identifier.ToString()); 3177Assert.Equal("a", cs.Identifier.ToString()); 3192Assert.Equal("X", ms.Identifier.ToString()); 3251Assert.Equal("a", cs.Identifier.ToString()); 3266Assert.Equal("M", ms.Identifier.ToString()); 3316Assert.Equal("a", cs.Identifier.ToString()); 3331Assert.Equal("X", ms.Identifier.ToString()); 3340Assert.Equal("c", ms.ParameterList.Parameters[0].Identifier.ToString()); 3368Assert.Equal("a", cs.Identifier.ToString()); 3383Assert.Equal("M", ms.Identifier.ToString()); 3414Assert.Equal("a", cs.Identifier.ToString()); 3430Assert.Equal("X", ms.Identifier.ToString()); 3495Assert.Equal("a", cs.Identifier.ToString()); 3530Assert.Equal("a", cs.Identifier.ToString()); 3577Assert.Equal("a", cs.Identifier.ToString()); 3614Assert.Equal("a", cs.Identifier.ToString()); 3630Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3674Assert.Equal("a", cs.Identifier.ToString()); 3690Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3714Assert.Equal("a", cs.Identifier.ToString()); 3731Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3768Assert.Equal("a", cs.Identifier.ToString()); 3786Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3824Assert.Equal("a", cs.Identifier.ToString()); 3841Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3869Assert.Equal("a", cs.Identifier.ToString()); 3885Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3913Assert.Equal("a", cs.Identifier.ToString()); 3929Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3958Assert.Equal("a", cs.Identifier.ToString()); 3976Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3981Assert.Equal("d", fs.Declaration.Variables[1].Identifier.ToString()); 3986Assert.Equal("e", fs.Declaration.Variables[2].Identifier.ToString()); 4012Assert.Equal("a", cs.Identifier.ToString()); 4030Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 4038Assert.Equal("d", fs.Declaration.Variables[1].Identifier.ToString()); 4046Assert.Equal("e", fs.Declaration.Variables[2].Identifier.ToString()); 4075Assert.Equal("a", cs.Identifier.ToString()); 4092Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 4121Assert.Equal("a", cs.Identifier.ToString()); 4136Assert.Equal("c", ps.Identifier.ToString()); 4175Assert.Equal("a", cs.Identifier.ToString()); 4190Assert.Equal("c", ps.Identifier.ToString()); 4230Assert.Equal("a", cs.Identifier.ToString()); 4245Assert.Equal("c", ps.Identifier.ToString()); 4303Assert.Equal("a", cs.Identifier.ToString()); 4318Assert.Equal("c", ps.Identifier.ToString()); 4357Assert.Equal("a", cs.Identifier.ToString()); 4372Assert.Equal("c", ps.Identifier.ToString()); 4411Assert.Equal("a", cs.Identifier.ToString()); 4426Assert.Equal("c", ps.Identifier.ToString()); 4495Assert.Equal("a", cs.Identifier.ToString()); 4510Assert.Equal("c", ps.Identifier.ToString()); 4551Assert.Equal("a", cs.Identifier.ToString()); 4566Assert.Equal("c", es.Identifier.ToString()); 4607Assert.Equal("a", cs.Identifier.ToString()); 4623Assert.Equal("c", ps.Identifier.ToString()); 4691Assert.Equal("a", cs.Identifier.ToString()); 4708Assert.Equal("c", ps.Identifier.ToString()); 4747Assert.Equal("a", cs.Identifier.ToString()); 4763Assert.Equal("c", es.Identifier.ToString()); 4801Assert.Equal("a", cs.Identifier.ToString()); 4818Assert.Equal("c", es.Identifier.ToString()); 4884Assert.Equal("a", cs.Identifier.ToString()); 4902Assert.Equal("c", es.Identifier.ToString()); 4941Assert.Equal("a", cs.Identifier.ToString()); 4956Assert.Equal("this", ps.ThisKeyword.ToString()); 4969Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5008Assert.Equal("a", cs.Identifier.ToString()); 5023Assert.Equal("this", ps.ThisKeyword.ToString()); 5036Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5076Assert.Equal("a", cs.Identifier.ToString()); 5091Assert.Equal("this", ps.ThisKeyword.ToString()); 5104Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5143Assert.Equal("a", cs.Identifier.ToString()); 5158Assert.Equal("this", ps.ThisKeyword.ToString()); 5173Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5180Assert.Equal("f", ps.ParameterList.Parameters[1].Identifier.ToString()); 5219Assert.Equal("a", cs.Identifier.ToString()); 5235Assert.Equal(".", ps.ExplicitInterfaceSpecifier.DotToken.ToString()); 5236Assert.Equal("this", ps.ThisKeyword.ToString()); 5249Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5287Assert.Equal("a", cs.Identifier.ToString()); 5316Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5323Assert.Equal("f", ps.ParameterList.Parameters[1].Identifier.ToString()); 5367Assert.Equal("a", cs.Identifier.ToString()); 5396Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5403Assert.Equal("f", ps.ParameterList.Parameters[1].Identifier.ToString()); 5481Assert.Equal("a", cs.Identifier.ToString()); 5510Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5544Assert.Equal("a", cs.Identifier.ToString()); 5571Assert.Equal("d", ms.ParameterList.Parameters[0].Identifier.ToString()); 5592Assert.Equal("a", cs.Identifier.ToString()); 5619Assert.Equal("d", ms.ParameterList.Parameters[0].Identifier.ToString());
Parsing\ExpressionParsingTests.cs (31)
2040Assert.Equal("a", lambda.Parameter.Identifier.ToString()); 2058Assert.Equal("a", lambda.Parameter.Identifier.ToString()); 2076Assert.Equal("a", lambda.Parameter.Identifier.ToString()); 2164Assert.Equal("a", ps.Identifier.ToString()); 2188Assert.Equal("a", ps.Identifier.ToString()); 2191Assert.Equal("a2", ps2.Identifier.ToString()); 2216Assert.Equal("a", ps.Identifier.ToString()); 2241Assert.Equal("a", ps.Identifier.ToString()); 2308Assert.Equal("a", fs.Identifier.ToString()); 2342Assert.Equal("a", fs.Identifier.ToString()); 2375Assert.Equal("a", fs.Identifier.ToString()); 2391Assert.Equal("c", qs.Body.Continuation.Identifier.ToString()); 2425Assert.Equal("a", fs.Identifier.ToString()); 2465Assert.Equal("a", fs.Identifier.ToString()); 2476Assert.Equal("b", fs.Identifier.ToString()); 2508Assert.Equal("a", fs.Identifier.ToString()); 2520Assert.Equal("b", ls.Identifier.ToString()); 2553Assert.Equal("a", fs.Identifier.ToString()); 2598Assert.Equal("a", fs.Identifier.ToString()); 2647Assert.Equal("a", fs.Identifier.ToString()); 2695Assert.Equal("a", fs.Identifier.ToString()); 2742Assert.Equal("a", fs.Identifier.ToString()); 2781Assert.Equal("a", fs.Identifier.ToString()); 2801Assert.Equal("d", qs.Body.Continuation.Identifier.ToString()); 2835Assert.Equal("a", fs.Identifier.ToString()); 2847Assert.Equal("b", js.Identifier.ToString()); 2892Assert.Equal("a", fs.Identifier.ToString()); 2904Assert.Equal("b", js.Identifier.ToString()); 2946Assert.Equal("a", fs.Identifier.ToString()); 2957Assert.Equal("b", js.Identifier.ToString()); 2974Assert.Equal("c", js.Into.Identifier.ToString());
Parsing\LocalFunctionParsingTests.cs (2)
1352Assert.Equal("local", s1.Identifier.ToString()); 1362Assert.Equal("local", s1.Identifier.ToString());
Parsing\NameParsingTests.cs (8)
625Assert.Equal("goo", gname.Identifier.ToString()); 650Assert.Equal("goo", gname.Identifier.ToString()); 676Assert.Equal("goo", gname.Identifier.ToString()); 702Assert.Equal("goo", gname.Identifier.ToString()); 734Assert.Equal("goo", gname.Identifier.ToString()); 759Assert.Equal("goo", gname.Identifier.ToString()); 782Assert.Equal(text, tok.ToString()); 798Assert.Equal(text, tok.ToString());
Parsing\ParsingErrorRecoveryTests.cs (4)
6915Assert.Equal("C1", item1.Identifier.ToString()); 6930Assert.Equal("x", decl.Declaration.Variables[0].Identifier.ToString()); 6939Assert.Equal("y", subitem2.Identifier.ToString()); 7377Assert.Equal("foreach", srcTree.GetLastToken().ToString());
Parsing\StatementParsingTests.cs (51)
199Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 229Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 263Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 293Assert.Equal("y", tt.Elements[1].Identifier.ToString()); 300Assert.Equal("l", tt.Elements[1].Identifier.ToString()); 304Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 334Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 360Assert.Equal("b", ds.Declaration.Variables[0].Identifier.ToString()); 386Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 412Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 438Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 464Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 490Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 516Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 521Assert.Equal("b", ds.Declaration.Variables[1].Identifier.ToString()); 526Assert.Equal("c", ds.Declaration.Variables[2].Identifier.ToString()); 551Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 581Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 589Assert.Equal("b", ds.Declaration.Variables[1].Identifier.ToString()); 597Assert.Equal("c", ds.Declaration.Variables[2].Identifier.ToString()); 626Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 658Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 690Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 722Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 754Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 784Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 810Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 841Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 851Assert.Equal("c", ds.Declaration.Variables[1].Identifier.ToString()); 978Assert.Equal("label", ls.Identifier.ToString()); 1245Assert.Equal("e", ts.Catches[0].Declaration.Identifier.ToString()); 1329Assert.Equal("e", ts.Catches[0].Declaration.Identifier.ToString()); 1395Assert.Equal("e", ts.Catches[0].Declaration.Identifier.ToString()); 1562Assert.Equal("a", fs.Declaration.Variables[0].Identifier.ToString()); 1601Assert.Equal("a", fs.Declaration.Variables[0].Identifier.ToString()); 1639Assert.Equal("a", fs.Declaration.Variables[0].Identifier.ToString()); 1646Assert.Equal("b", fs.Declaration.Variables[1].Identifier.ToString()); 1897Assert.Equal("a", fs.Declaration.Variables[0].Identifier.ToString()); 1937Assert.Equal("a", fs.Identifier.ToString()); 1970Assert.Equal("a", fs.Identifier.ToString()); 2001Assert.Equal("a", fs.Identifier.ToString()); 2376Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2409Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2471Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2506Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2640Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2811Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2819Assert.Equal("c", us.Declaration.Variables[1].Identifier.ToString()); 2854Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2862Assert.Equal("c", us.Declaration.Variables[1].Identifier.ToString()); 3385Assert.Equal("a", fs.Identifier.ToString());
Syntax\StructuredTriviaTests.cs (2)
70Assert.Equal("banana", ident.ToString()); 79Assert.Equal("goo", result.ToString());
Syntax\SyntaxNodeTests.cs (3)
665Assert.Equal("Goo", node.ToString()); 676Assert.Equal("goo", token.ToString()); 3565Assert.Equal("class", token.ToString());
Syntax\SyntaxRewriterTests.cs (1)
337var tokenT = tree.GetCompilationUnitRoot().DescendantTokens().Where(t => t.ToString() == "T").Single();
Microsoft.CodeAnalysis.CSharp.Workspaces (20)
Classification\ClassificationHelpers.cs (2)
454if (token.ToString() != token.ValueText) 538var tokenString = token.ToString();
CodeGeneration\CSharpSyntaxGenerator.cs (3)
909return (EnumMemberDeclarationSyntax)this.EnumMember(id.Identifier.ToString(), null); 916return (EnumMemberDeclarationSyntax)this.EnumMember(vd.Identifier.ToString(), vd.Initializer?.Value); 1851var clause = clauses.FirstOrDefault(c => c.Name.Identifier.ToString() == typeParameterName);
Rename\CSharpRenameRewriterLanguageService.cs (1)
637var originalString = newToken.ToString();
Simplification\CSharpSimplificationService.cs (1)
132syntaxToken.ToString(),
Simplification\Reducers\CSharpEscapingReducer.cs (2)
137var unescapedText = isVerbatimIdentifier ? originalToken.ToString()[1..] : originalToken.ToString();
Simplification\Simplifiers\ExpressionSimplifier.cs (2)
149text = declIdentifier.IsVerbatimIdentifier() ? declIdentifier.ToString()[1..] : declIdentifier.ToString();
Simplification\Simplifiers\NameSimplifier.cs (2)
125text = declIdentifier.IsVerbatimIdentifier() ? declIdentifier.ToString()[1..] : declIdentifier.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
43=> token.ToString() == SyntaxFacts.GetText(kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
468return this.IsIdentifier(token) && !token.ContainsDiagnostics && token.ToString().Length == identifier.Length; 474return this.IsIdentifier(token) && !token.ContainsDiagnostics && token.ToString().Length == identifier.Length && token.IsVerbatimIdentifier();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (2)
131var tokenText = token.ToString(); 140var tokenText = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
142var numericText = numericToken.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
51syntaxToken.ToString(),
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2 (1)
Utilities\AssertEx.vb (1)
31Assert.Equal(expectedToken.ToString(), actualToken.ToString())
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Simplification\TypeNameSimplifierTest.vb (1)
4262Assert.NotEqual(0, result.ToString().Count)
Microsoft.CodeAnalysis.Features (3)
Completion\Providers\Scripting\AbstractDirectivePathCompletionProvider.cs (1)
46var literalValue = stringLiteral.ToString();
Rename\SymbolicRenameInfo.cs (1)
172triggerToken.ToString().Equals("New", StringComparison.OrdinalIgnoreCase))
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
152node.GetFirstToken().ToString(),
Microsoft.CodeAnalysis.Test.Utilities (8)
Syntax\TokenUtilities.cs (8)
26var expectedToken = expectedTokens[i].ToString(); 27var actualToken = actualTokens[i].ToString(); 38actualAll += "^" + actualTokens[j].ToString() + "^ "; 39expectedAll += "^" + expectedTokens[j].ToString() + "^ "; 43actualAll += actualTokens[j].ToString() + " "; 44expectedAll += expectedTokens[j].ToString() + " "; 55var expectedDisplay = string.Join(" ", expectedTokens.Select(t => t.ToString())); 56var actualDisplay = string.Join(" ", actualTokens.Select(t => t.ToString()));
Microsoft.CodeAnalysis.UnitTests (4)
CommonSyntaxTests.cs (4)
87Assert.Equal("test", token.ToString()); 103Assert.Equal("test", token.ToString()); 210var exprB = expr.DescendantNodes().OfType<CSharp.Syntax.IdentifierNameSyntax>().First(n => n.Identifier.ToString() == "b"); 231var exprB = expr.DescendantNodes().OfType<CSharp.Syntax.IdentifierNameSyntax>().First(n => n.Identifier.ToString() == "b");
Microsoft.CodeAnalysis.VisualBasic (21)
Binding\Binder_Statements.vb (3)
973ReportDiagnostic(diagBag, keywordSyntax, ERRID.ERR_BadLocalDimFlags1, keywordSyntax.ToString()) 993ReportDiagnostic(diagBag, firstDim, ERRID.ERR_BadLocalConstFlags1, firstDim.ToString()) 995ReportDiagnostic(diagBag, firstStatic, ERRID.ERR_BadLocalConstFlags1, firstStatic.ToString())
Binding\Binder_Utils.vb (5)
73ReportDiagnostic(diagBag, location, errid, badKeyword.ToString() & " " & friendToken.ToString()) 79ReportDiagnostic(diagBag, badKeyword, errid, badKeyword.ToString()) 163ReportDiagnostic(diagBag, keywordSyntax, errIdBadModifier, keywordSyntax.ToString()) 991diagnostics.Add(ERRID.ERR_ByRefIllegal1, location, container.GetKindText(), token.ToString())
Symbols\Source\CustomEventAccessorSymbol.vb (3)
257diagnostics.Add(ERRID.ERR_EventMethodOptionalParamIllegal1, location, token.ToString()) 263diagnostics.Add(ERRID.ERR_EventMethodOptionalParamIllegal1, location, token.ToString()) 274diagnostics.Add(ERRID.ERR_EventAddRemoveByrefParamIllegal, location, token.ToString())
Symbols\Source\SourceNamedTypeSymbol.vb (8)
299id.ToString(), 316Binder.ReportDiagnostic(diagBag, id, ERRID.ERR_PartialTypeBadMustInherit1, id.ToString()) 385Binder.ReportDiagnostic(diagBag, id, ERRID.ERR_ShadowingTypeOutsideClass1, id.ToString()) 529Me.GetKindText(), id.ToString, _3rdArg, s.Name) 542_3rdArg, s.Name, Me.GetKindText(), id.ToString) 561Me.GetKindText(), id.ToString, _3rdArg, s.Name, 681Dim identifier As String = GetTypeIdentifierToken(firstNode).ToString 685nodeKindText, id.ToString,
Symbols\Source\SourcePropertyAccessorSymbol.vb (1)
467diagnostics.Add(ERRID.ERR_SetHasToBeByVal1, location, token.ToString())
VisualBasicExtensions.vb (1)
387token.ToString()),
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
49If String.Compare(identifierName.Identifier.ToString(), "New", StringComparison.OrdinalIgnoreCase) <> 0 Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTokenExtensions.vb (1)
31Return String.Equals(token.ToString(), SyntaxFacts.GetText(kind), StringComparison.OrdinalIgnoreCase)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (1)
234(token.Span.Length > startLength AndAlso Not token.ToString().EndsWith(lastChar, StringComparison.Ordinal)))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
464Return IsIdentifier(token) AndAlso Not token.ContainsDiagnostics AndAlso token.ToString().Length = identifier.Length
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\NameSyntaxComparer.vb (1)
108result.Add(SyntaxFactory.IdentifierName(SyntaxFactory.Identifier(globalName.GlobalKeyword.ToString())))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\TokenComparer.vb (2)
28Dim token1IsSystem = IsSystem(token1.ToString()) 29Dim token2IsSystem = IsSystem(token2.ToString())
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EnumMemberGenerator.vb (1)
106Dim numericText = numericToken.ToString()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\CallStatementSyntaxExtensions.vb (1)
16Not SyntaxFacts.GetContextualKeywordKind(nextToken.ToString()) = SyntaxKind.MidKeyword Then
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (3)
EndConstructGeneration\EndConstructStatementVisitor.vb (2)
76Return New SpitLinesResult({"", aligningWhitespace & "End " & node.EnumKeyword.ToString()}) 123Return New SpitLinesResult({"", aligningWhitespace & "End " & methodBlock.BlockStatement.DeclarationKeyword.ToString()})
EndConstructGeneration\EndConstructStatementVisitor_LambdaHeader.vb (1)
136Dim endConstruct = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(spanStart) & "End " & node.DeclarationKeyword.ToString()
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTestBase.vb (1)
121Return DirectCast(node, ModifiedIdentifierSyntax).Identifier.ToString()
Microsoft.CodeAnalysis.VisualBasic.Features (7)
BraceCompletion\BracketBraceCompletionService.vb (1)
44token.ToString() = Bracket.OpenCharacter Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
692If Not String.Equals(memberAccess.Name.Identifier.ToString(), "New", StringComparison.OrdinalIgnoreCase) Then
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (1)
81name:=_methodName.ToString(),
QuickInfo\VisualBasicSemanticQuickInfoProvider.vb (1)
118If SyntaxFacts.GetContextualKeywordKind(token.ToString()) = SyntaxKind.MidKeyword Then
Structure\Providers\RegionDirectiveStructureProvider.vb (3)
17Dim text = regionDirective.Name.ToString().Trim(""""c) 20Return regionDirective.HashToken.ToString() & regionDirective.RegionKeyword.ToString()
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (38)
Scanner\ScannerTests.vb (1)
1898Assert.Equal("""Hello," & vbLf & "World!""", token.ToString())
Syntax\ManualTests.vb (1)
228Assert.Equal(">", token.ToString())
Syntax\SyntaxFactsTest.vb (1)
1051builder.Append(currentToken.ToString())
Syntax\SyntaxTokenFactoryTests.vb (13)
20Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword)) 25Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.XmlKeyword)) 44Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 49Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 54Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 64Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken)) 69Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.XmlKeyword)) 88Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 93Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 98Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 124Assert.Equal(token.ToString(), SyntaxFacts.GetText(CType(k, SyntaxKind))) 128Assert.Equal(token.ToString(), SyntaxFacts.GetText(CType(k, SyntaxKind)).ToUpperInvariant) 132Assert.Equal(token.ToString(), String.Empty)
TestSyntaxNodes.vb (22)
485Assert.Equal("ByVal", l(0).ToString()) 494Assert.Equal("ByVal", l(0).ToString()) 502Assert.Equal("ByVal", l(0).ToString()) 518Assert.Equal("ByVal", l(0).ToString()) 519Assert.Equal("Optional", l(1).ToString()) 520Assert.Equal("ByRef", l(2).ToString()) 533Assert.Equal("ByVal", param.Modifiers(0).ToString()) 534Assert.Equal("Optional", param.Modifiers(1).ToString()) 535Assert.Equal("ByRef", param.Modifiers(2).ToString()) 547Assert.Equal("ByVal", param.Modifiers(0).ToString()) 548Assert.Equal("Optional", param.Modifiers(1).ToString()) 549Assert.Equal("ByRef", param.Modifiers(2).ToString()) 770Assert.Equal("Alias", keyword.ToString()) 782Assert.Equal("ALIAs", keyword.ToString()) 791Assert.Equal("ANDALSO", keyword.ToString()) 802Assert.Equal("andalso", keyword.ToString()) 819Assert.Equal("End", endTry.EndKeyword.ToString()) 821Assert.Equal("Try", endTry.BlockKeyword.ToString()) 845Assert.Equal("ParTIAL", keyword.ToString()) 853Assert.Equal("[goo]", identifier.ToString()) 1802Assert.Equal("banana", ident.ToString()) 1811Assert.Equal("goo", result.ToString())
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
ParserTestUtilities.vb (2)
768Assert.Equal(tk.ToString().Trim(), tk.ToString())
Microsoft.CodeAnalysis.VisualBasic.Workspaces (17)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (3)
254Dim actualText = token.ToString() 275Dim actualText = token.ToString() 290Dim actualText = token.ToString()
Classification\ClassificationHelpers.vb (2)
223ElseIf (identifier.ToString() = "IsTrue" OrElse identifier.ToString() = "IsFalse") AndAlso
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (1)
280Dim actualText = token.ToString()
Rename\VisualBasicRenameRewriterLanguageService.vb (2)
562If(oldToken.GetTypeCharacter() = TypeCharacter.None, currentNewIdentifier, currentNewIdentifier + oldToken.ToString().Last()), 590Dim originalString = newToken.ToString()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
49If String.Compare(identifierName.Identifier.ToString(), "New", StringComparison.OrdinalIgnoreCase) <> 0 Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTokenExtensions.vb (1)
31Return String.Equals(token.ToString(), SyntaxFacts.GetText(kind), StringComparison.OrdinalIgnoreCase)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (1)
234(token.Span.Length > startLength AndAlso Not token.ToString().EndsWith(lastChar, StringComparison.Ordinal)))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
464Return IsIdentifier(token) AndAlso Not token.ContainsDiagnostics AndAlso token.ToString().Length = identifier.Length
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\NameSyntaxComparer.vb (1)
108result.Add(SyntaxFactory.IdentifierName(SyntaxFactory.Identifier(globalName.GlobalKeyword.ToString())))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\TokenComparer.vb (2)
28Dim token1IsSystem = IsSystem(token1.ToString()) 29Dim token2IsSystem = IsSystem(token2.ToString())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EnumMemberGenerator.vb (1)
106Dim numericText = numericToken.ToString()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\CallStatementSyntaxExtensions.vb (1)
16Not SyntaxFacts.GetContextualKeywordKind(nextToken.ToString()) = SyntaxKind.MidKeyword Then
Microsoft.CodeAnalysis.Workspaces (9)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
372.Select(t => Tuple.Create(t.ToString(), t.Span.Start, t.Span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
505_startToken.ToString().Replace("\r\n", "\\r\\n"), 506_endToken.ToString().Replace("\r\n", "\\r\\n"));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
321var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
137spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
897var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
138while (token != default && string.IsNullOrWhiteSpace(token.ToString()))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
166var tokenText = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
109if (!IsOnSingleLine(token.ToString()))
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
62var type = tree.GetRoot().DescendantTokens().First(t => t.ToString() == "class").Parent; 440var type = tree.GetRoot().DescendantTokens().First(t => t.ToString() == "class").Parent; 2848var type = tree.GetRoot().DescendantTokens().First(t => t.ToString() == "class").Parent;
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SyntaxNodeTests.cs (2)
61return Task.FromResult<SyntaxNode>(classDecl.WithIdentifier(SyntaxFactory.Identifier(id.LeadingTrivia, id.ToString() + "1", id.TrailingTrivia))); 67return Task.FromResult<SyntaxNode>(varDecl.WithIdentifier(SyntaxFactory.Identifier(id.LeadingTrivia, id.ToString() + "1", id.TrailingTrivia)));
Microsoft.Extensions.Logging.Generators (2)
LoggerMessageGenerator.Parser.cs (2)
256Diag(DiagnosticDescriptors.MalformedFormatStrings, method.Identifier.GetLocation(), method.Identifier.ToString()); 330Diag(DiagnosticDescriptors.RedundantQualifierInMessage, ma.GetLocation(), method.Identifier.ToString());
Microsoft.Gen.Logging (3)
Parsing\Parser.cs (3)
322Name = typeDec.Identifier.ToString() + typeDec.TypeParameterList, 343Name = parentLoggerClass.Identifier.ToString() + parentLoggerClass.TypeParameterList, 390Diag(DiagDescriptors.MalformedFormatStrings, method.Identifier.GetLocation(), method.Identifier.ToString());
Microsoft.Gen.Metrics (2)
Parser.cs (2)
137Name = typeDeclaration.Identifier.ToString() + typeDeclaration.TypeParameterList, 159Name = parentMetricClass.Identifier.ToString() + parentMetricClass.TypeParameterList,
Microsoft.Gen.MetricsReports (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
137Name = typeDeclaration.Identifier.ToString() + typeDeclaration.TypeParameterList, 159Name = parentMetricClass.Identifier.ToString() + parentMetricClass.TypeParameterList,
Microsoft.ML.InternalCodeAnalyzer (2)
ContractsCheckNameofFixProvider.cs (2)
118if (param.Identifier.ToString() == nameArgValue) 135var argName = argParam.Identifier.ToString();
Microsoft.VisualStudio.LanguageServices.CSharp (24)
CodeModel\CSharpCodeModelService.CodeModelEventCollector.cs (8)
538if (!StringComparer.Ordinal.Equals(oldType.Identifier.ToString(), newType.Identifier.ToString())) 596if (!StringComparer.Ordinal.Equals(oldDelegate.Identifier.ToString(), newDelegate.Identifier.ToString())) 729return StringComparer.Ordinal.Equals(oldIdentifierName.Identifier.ToString(), newIdentifierName.Identifier.ToString()); 742if (!StringComparer.Ordinal.Equals(oldGenericName.Identifier.ToString(), newGenericName.Identifier.ToString()))
CodeModel\CSharpCodeModelService.cs (14)
807return ((BaseTypeDeclarationSyntax)node).Identifier.ToString(); 809return ((DelegateDeclarationSyntax)node).Identifier.ToString(); 812((MethodDeclarationSyntax)node).Identifier.ToString(); 814return ((ConstructorDeclarationSyntax)node).Identifier.ToString(); 816return "~" + ((DestructorDeclarationSyntax)node).Identifier.ToString(); 819((PropertyDeclarationSyntax)node).Identifier.ToString(); 822((IndexerDeclarationSyntax)node).ThisKeyword.ToString(); 825((EventDeclarationSyntax)node).Identifier.ToString(); 832return "operator " + ((OperatorDeclarationSyntax)node).OperatorToken.ToString(); 839return ((EnumMemberDeclarationSyntax)node).Identifier.ToString(); 841return ((VariableDeclaratorSyntax)node).Identifier.ToString(); 1538if (parameter.Identifier.ToString() == name) 1684return attributeList.Target.Identifier.ToString(); 1859return parameter.Identifier.ToString();
CodeModel\MethodXml\MethodXmlBuilder.cs (2)
119GenerateName(variable.Identifier.ToString()); 535GenerateName(identifierName.Identifier.ToString());
Microsoft.VisualStudio.LanguageServices.VisualBasic (48)
CodeModel\MethodXML\MethodXmlBuilder.vb (1)
75EncodedText(name.Identifier.ToString())
CodeModel\SyntaxExtensions.vb (7)
33Return DirectCast(method, MethodStatementSyntax).Identifier.ToString() 35Return DirectCast(method, SubNewStatementSyntax).NewKeyword.ToString() 37Return DirectCast(method, OperatorStatementSyntax).OperatorToken.ToString() 40Return DirectCast(method, DeclareStatementSyntax).Identifier.ToString() 43Return DirectCast(method, DelegateStatementSyntax).Identifier.ToString() 45Return DirectCast(method, EventStatementSyntax).Identifier.ToString() 47Return DirectCast(method, PropertyStatementSyntax).Identifier.ToString()
CodeModel\VisualBasicCodeModelService.CodeModelEventCollector.vb (16)
396If Not StringComparer.OrdinalIgnoreCase.Equals(oldType.BlockStatement.Identifier.ToString(), newType.BlockStatement.Identifier.ToString()) Then 459If Not StringComparer.OrdinalIgnoreCase.Equals(oldEnum.EnumStatement.Identifier.ToString(), newEnum.EnumStatement.Identifier.ToString()) Then 662If Not StringComparer.OrdinalIgnoreCase.Equals(oldProperty.Identifier.ToString(), newProperty.Identifier.ToString()) Then 723If Not StringComparer.OrdinalIgnoreCase.Equals(oldEvent.Identifier.ToString(), newEvent.Identifier.ToString()) Then 816If Not StringComparer.OrdinalIgnoreCase.Equals(oldModifiedIdentifier.Identifier.ToString(), newModifiedIdentifier.Identifier.ToString()) Then 850If Not StringComparer.Ordinal.Equals(oldEnumMember.Identifier.ToString(), newEnumMember.Identifier.ToString()) Then 1066Return StringComparer.OrdinalIgnoreCase.Equals(oldIdentifierName.Identifier.ToString(), newIdentifierName.Identifier.ToString()) 1079If Not StringComparer.OrdinalIgnoreCase.Equals(oldGenericName.Identifier.ToString(), newGenericName.Identifier.ToString()) Then
CodeModel\VisualBasicCodeModelService.NodeNameGenerator.vb (1)
53builder.Append(DirectCast(type, PredefinedTypeSyntax).Keyword.ToString())
CodeModel\VisualBasicCodeModelService.vb (22)
859nameBuilder.Append(token.ToString()) 893Return DirectCast(node, TypeBlockSyntax).BlockStatement.Identifier.ToString() 895Return DirectCast(node, EnumBlockSyntax).EnumStatement.Identifier.ToString() 898Return DirectCast(node, DelegateStatementSyntax).Identifier.ToString() 904Return methodBlock.SubOrFunctionStatement.Identifier.ToString() 907Return DirectCast(node, MethodStatementSyntax).Identifier.ToString() 910Return DirectCast(node, DeclareStatementSyntax).Identifier.ToString() 913Return methodBlock.SubNewStatement.NewKeyword.ToString() 916Return operatorBlock.OperatorStatement.OperatorToken.ToString() 919Return propertyBlock.PropertyStatement.Identifier.ToString() 921Return DirectCast(node, PropertyStatementSyntax).Identifier.ToString() 923Return DirectCast(node, EventBlockSyntax).EventStatement.Identifier.ToString() 925Return DirectCast(node, EventStatementSyntax).Identifier.ToString() 927Return DirectCast(node, ModifiedIdentifierSyntax).Identifier.ToString() 929Return DirectCast(node, EnumMemberDeclarationSyntax).Identifier.ToString() 944Return DirectCast(node, InheritsStatementSyntax).InheritsKeyword.ToString() 946Return DirectCast(node, ImplementsStatementSyntax).ImplementsKeyword.ToString() 1788attribute.Target.AttributeModifier.ToString(), 1933simpleImportsClause.Alias.Identifier.ToString(), 1971Dim parameterName As String = parameter.Identifier.Identifier.ToString() 4066Dim parentName = parentTypeBlock.BlockStatement.Identifier.ToString() 4094Dim parentName = parentTypeBlock.BlockStatement.Identifier.ToString()
Snippets\VisualBasicSnippetExpansionLanguageHelper.vb (1)
181If Not aliasImports.Any(Function(a) ordinalIgnoreCaseStringComparer.Equals(a.Alias.Identifier.ToString(), simpleImportsClause.Alias.Identifier.ToString()) AndAlso