Base:
688 references to ToString
Microsoft.CodeAnalysis (3)
DiagnosticAnalyzer\AnalysisContextInfo.cs (1)
134sb.Append(token.ToString());
Syntax\SyntaxToken.cs (2)
50return GetType().Name + " " + (Node != null ? Node.KindText : "None") + " " + ToString(); 156public string Text => ToString();
Microsoft.CodeAnalysis.CodeStyle (9)
AbstractDocumentationCommentService.cs (1)
166var tokenText = token.ToString();
AbstractForEachCastDiagnosticAnalyzer.cs (1)
135node.GetFirstToken().ToString(),
AbstractFormatEngine.cs (2)
490_startToken.ToString().Replace("\r\n", "\\r\\n"), 491_endToken.ToString().Replace("\r\n", "\\r\\n"));
AbstractIndentation.Indenter.cs (1)
137while (token != default && string.IsNullOrWhiteSpace(token.ToString()))
AbstractTriviaFormatter.cs (1)
897var tokenText = this.Token1.ToString();
FormattingExtensions.cs (1)
154spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
ISyntaxFactsExtensions.cs (1)
111if (!IsOnSingleLine(token.ToString()))
TokenStream.cs (1)
321var text = token.ToString();
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Symbols.cs (2)
491diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refToken.GetLocation(), refToken.ToString()); 505diagnostics.Add(ErrorCode.ERR_UnexpectedToken, scopedToken.GetLocation(), scopedToken.ToString());
Symbols\Source\SourceLabelSymbol.cs (1)
53return ((DefaultSwitchLabelSyntax)node).Keyword.ToString();
Symbols\Source\SourceMethodSymbol.cs (1)
36diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refKeyword.GetLocation(), refKeyword.ToString());
Symbols\Symbol_Attributes.cs (1)
719targetOpt.Identifier.GetLocation(), targetOpt.Identifier.ToString(), allowedTargets.ToDisplayString());
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
CSharpSyntaxFacts.cs (2)
465return this.IsIdentifier(token) && !token.ContainsDiagnostics && token.ToString().Length == identifier.Length; 471return this.IsIdentifier(token) && !token.ContainsDiagnostics && token.ToString().Length == identifier.Length && token.IsVerbatimIdentifier();
SyntaxTokenExtensions.cs (1)
42=> token.ToString() == SyntaxFacts.GetText(kind);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
CSharpCodeGenerationHelpers.cs (2)
128var tokenText = token.ToString(); 137var tokenText = token.ToString();
CSharpSimplificationHelpers.cs (1)
51syntaxToken.ToString(),
EnumMemberGenerator.cs (1)
140var numericText = numericToken.ToString();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (2)
233if (previousToken.Kind() == SyntaxKind.StringLiteralToken && previousToken.ToString().Last() != '"') 238if (previousToken.Kind() == SyntaxKind.CharacterLiteralToken && previousToken.ToString().Last() != '\'')
TextStructureNavigation\CSharpTextStructureNavigatorProvider.cs (1)
70var text = token.ToString();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenTupleTest.cs (1)
25063Assert.Equal("x", x.Identifier.ToString());
Emit\EditAndContinue\EditAndContinueTestBase.cs (1)
112return ((VariableDeclaratorSyntax)node).Identifier.ToString();
Microsoft.CodeAnalysis.CSharp.Features (16)
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (2)
166displayText: p.Name.ToIdentifierToken().ToString(), 189displayText: p.Name.ToIdentifierToken().ToString(),
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
116var escapedName = parameter.Name.ToIdentifierToken().ToString();
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
343if (textTokens.Any(t => !string.IsNullOrWhiteSpace(t.ToString())))
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (4)
702new[] { property.Identifier.ToString() })); 713new[] { property.Identifier.ToString() })); 2766new[] { insertedForEachStatement.AwaitKeyword.ToString() })); 2782new[] { newLocalDeclaration.AwaitKeyword.ToString() }));
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
114name: _methodName.ToString(),
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (2)
254var variableName = declaration.Declaration.Variables[0].Identifier.ToString(); 285var variableName = declaration.Declaration.Variables[0].Identifier.ToString();
SignatureHelp\AttributeSignatureHelpProvider.cs (1)
182namedParameter, namedParameter.Name.ToIdentifierToken().ToString()));
Snippets\CSharpForEachLoopSnippetProvider.cs (1)
64arrayBuilder.Add(new SnippetPlaceholder(identifier.ToString(), ImmutableArray.Create(identifier.SpanStart)));
Snippets\CSharpSnippetFunctionService.cs (1)
31return type?.Identifier.ToString();
Structure\Providers\RegionDirectiveStructureProvider.cs (2)
24return simpleDirective.HashToken.ToString() + kw.ToString();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
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\RecordTests.cs (4)
1822Assert.Equal("Main", main.Identifier.ToString()); 8136Assert.Equal("Main", main.Identifier.ToString()); 8636Assert.Equal("Main", main.Identifier.ToString()); 8741Assert.Equal("Main", main.Identifier.ToString());
Semantics\RefFieldTests.cs (4)
16239Assert.Equal("r1", lambdas[0].ParameterList.Parameters[0].Identifier.ToString()); 16242Assert.Equal("t1", lambdas[0].ParameterList.Parameters[1].Identifier.ToString()); 16246Assert.Equal("r2", lambdas[1].ParameterList.Parameters[0].Identifier.ToString()); 16249Assert.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 (350)
IncrementalParsing\NodeValidators.cs (1)
65Assert.Equal(genericName.Identifier.ToString(), name);
LexicalAndXml\PreprocessorTests.cs (1)
1687Assert.Equal("A", td.Identifier.ToString());
LexicalAndXml\XmlDocCommentTests.cs (45)
277Assert.Equal("x'y'z", attr.TextTokens[0].ToString()); 304Assert.Equal("x\"y\"z", attr.TextTokens[0].ToString()); 833Assert.Equal(" this is a test", cdata.TextTokens[0].ToString()); 834Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 835Assert.Equal(" of &some; cdata /// */ /**", cdata.TextTokens[2].ToString()); 836Assert.Equal(Environment.NewLine, cdata.TextTokens[3].ToString()); 837Assert.Equal(" \"']]<>/></text", cdata.TextTokens[4].ToString()); 864Assert.Equal(" this is a test", cdata.TextTokens[0].ToString()); 865Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 866Assert.Equal(" of &some; cdata", cdata.TextTokens[2].ToString()); 867Assert.Equal(Environment.NewLine, cdata.TextTokens[3].ToString()); 868Assert.Equal(" \"']]<>/></text", cdata.TextTokens[4].ToString()); 893Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 918Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 919Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 944Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 945Assert.Equal("\u0085", cdata.TextTokens[1].ToString()); 969Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 995Assert.Equal(" this is a test", comment.TextTokens[0].ToString()); 996Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 997Assert.Equal(" of &some; comment", comment.TextTokens[2].ToString()); 998Assert.Equal(Environment.NewLine, comment.TextTokens[3].ToString()); 999Assert.Equal(" \"']]<>/></text", comment.TextTokens[4].ToString()); 1026Assert.Equal(" this is a test", comment.TextTokens[0].ToString()); 1027Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 1028Assert.Equal(" of &some; comment", comment.TextTokens[2].ToString()); 1029Assert.Equal(Environment.NewLine, comment.TextTokens[3].ToString()); 1030Assert.Equal(" \"']]<>/></text", comment.TextTokens[4].ToString()); 1055Assert.Equal(" incomplete", comment.TextTokens[0].ToString()); 1080Assert.Equal(" incomplete", comment.TextTokens[0].ToString()); 1081Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 1105Assert.Equal(" incomplete", comment.TextTokens[0].ToString()); 1133Assert.Equal(" this is a test", ProcessingInstruction.TextTokens[0].ToString()); 1134Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[1].ToString()); 1135Assert.Equal(" of &a; ProcessingInstruction /// */ /**", ProcessingInstruction.TextTokens[2].ToString()); 1136Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[3].ToString()); 1137Assert.Equal(" \"']]>/>?</text", ProcessingInstruction.TextTokens[4].ToString()); 1167Assert.Equal(" this is a test <!--", ProcessingInstruction.TextTokens[0].ToString()); 1168Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[1].ToString()); 1169Assert.Equal(" of &a; ProcessingInstruction", ProcessingInstruction.TextTokens[2].ToString()); 1170Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[3].ToString()); 1171Assert.Equal(" \"']]>/></text>]]>", ProcessingInstruction.TextTokens[4].ToString()); 1224Assert.Equal(" incomplete", ProcessingInstruction.TextTokens[0].ToString()); 1225Assert.Equal("\u0085", ProcessingInstruction.TextTokens[1].ToString()); 1251Assert.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)
627Assert.Equal("goo", gname.Identifier.ToString()); 652Assert.Equal("goo", gname.Identifier.ToString()); 678Assert.Equal("goo", gname.Identifier.ToString()); 704Assert.Equal("goo", gname.Identifier.ToString()); 736Assert.Equal("goo", gname.Identifier.ToString()); 761Assert.Equal("goo", gname.Identifier.ToString()); 784Assert.Equal(text, tok.ToString()); 800Assert.Equal(text, tok.ToString());
Parsing\ParsingErrorRecoveryTests.cs (4)
6111Assert.Equal("C1", item1.Identifier.ToString()); 6126Assert.Equal("x", decl.Declaration.Variables[0].Identifier.ToString()); 6135Assert.Equal("y", subitem2.Identifier.ToString()); 6587Assert.Equal("foreach", srcTree.GetLastToken().ToString());
Parsing\StatementParsingTests.cs (54)
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()); 2540Assert.Equal("public", us.Modifiers[0].ToString()); 2541Assert.Equal("readonly", us.Modifiers[1].ToString()); 2544Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2637Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2808Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2816Assert.Equal("c", us.Declaration.Variables[1].Identifier.ToString()); 2851Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2859Assert.Equal("c", us.Declaration.Variables[1].Identifier.ToString()); 3382Assert.Equal("a", fs.Identifier.ToString());
Syntax\StructuredTriviaTests.cs (2)
70Assert.Equal("banana", ident.ToString()); 79Assert.Equal("goo", result.ToString());
Syntax\SyntaxNodeTests.cs (3)
642Assert.Equal("Goo", node.ToString()); 653Assert.Equal("goo", token.ToString()); 3493Assert.Equal("class", token.ToString());
Syntax\SyntaxRewriterTests.cs (1)
337var tokenT = tree.GetCompilationUnitRoot().DescendantTokens().Where(t => t.ToString() == "T").Single();
Syntax\SyntaxTokenListTests.cs (3)
65Assert.Equal("A", list[0].ToString()); 66Assert.Equal("B", list[1].ToString()); 67Assert.Equal("C", list[2].ToString());
Microsoft.CodeAnalysis.CSharp.Workspaces (20)
Classification\ClassificationHelpers.cs (2)
456if (token.ToString() != token.ValueText) 540var tokenString = token.ToString();
CodeGeneration\CSharpSyntaxGenerator.cs (3)
875return (EnumMemberDeclarationSyntax)this.EnumMember(id.Identifier.ToString(), null); 882return (EnumMemberDeclarationSyntax)this.EnumMember(vd.Identifier.ToString(), vd.Initializer?.Value); 1859var clause = clauses.FirstOrDefault(c => c.Name.Identifier.ToString() == typeParameterName);
CSharpCodeGenerationHelpers.cs (2)
128var tokenText = token.ToString(); 137var tokenText = token.ToString();
CSharpSimplificationHelpers.cs (1)
51syntaxToken.ToString(),
CSharpSyntaxFacts.cs (2)
465return this.IsIdentifier(token) && !token.ContainsDiagnostics && token.ToString().Length == identifier.Length; 471return this.IsIdentifier(token) && !token.ContainsDiagnostics && token.ToString().Length == identifier.Length && token.IsVerbatimIdentifier();
EnumMemberGenerator.cs (1)
140var numericText = numericToken.ToString();
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
42=> token.ToString() == SyntaxFacts.GetText(kind);
Rename\CSharpRenameRewriterLanguageService.cs (1)
645var originalString = newToken.ToString();
Simplification\CSharpSimplificationService.cs (1)
133syntaxToken.ToString(),
Simplification\Reducers\CSharpEscapingReducer.cs (2)
138var unescapedText = isVerbatimIdentifier ? originalToken.ToString()[1..] : originalToken.ToString();
Simplification\Simplifiers\ExpressionSimplifier.cs (2)
152text = declIdentifier.IsVerbatimIdentifier() ? declIdentifier.ToString()[1..] : declIdentifier.ToString();
Simplification\Simplifiers\NameSimplifier.cs (2)
125text = declIdentifier.IsVerbatimIdentifier() ? declIdentifier.ToString()[1..] : declIdentifier.ToString();
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (1)
Snippets\CSharpSnippets\SnippetFunctions\SnippetFunctionClassName.cs (1)
29value = type.Identifier.ToString();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2 (4)
Utilities\AssertEx.vb (4)
17Dim expectedDisplay = String.Join(" ", expectedNewTokens.Select(Function(t) t.ToString())) 18Dim actualDisplay = String.Join(" ", actualNewTokens.Select(Function(t) t.ToString())) 31Assert.Equal(expectedToken.ToString(), actualToken.ToString())
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Rename\RenameEngineResult.vb (1)
226newText = newToken.ToString()
Microsoft.CodeAnalysis.Features (5)
AbstractForEachCastDiagnosticAnalyzer.cs (1)
135node.GetFirstToken().ToString(),
Completion\Providers\Scripting\AbstractDirectivePathCompletionProvider.cs (1)
48var literalValue = stringLiteral.ToString();
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (1)
54var numericText = numericToken.ToString();
Rename\SymbolicRenameInfo.cs (1)
172triggerToken.ToString().Equals("New", StringComparison.OrdinalIgnoreCase))
Snippets\SnippetProviders\AbstractConstructorSnippetProvider.cs (1)
40containingTypeName: syntaxFacts.GetIdentifierOfTypeDeclaration(containingType).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 (36)
Binding\Binder_Statements.vb (10)
942ReportDiagnostic(diagBag, keywordSyntax, ERRID.ERR_BadLocalDimFlags1, keywordSyntax.ToString()) 962ReportDiagnostic(diagBag, firstDim, ERRID.ERR_BadLocalConstFlags1, firstDim.ToString()) 964ReportDiagnostic(diagBag, firstStatic, ERRID.ERR_BadLocalConstFlags1, firstStatic.ToString()) 1172ReportDiagnostic(diagnostics, asNew.NewExpression.NewKeyword, ERRID.ERR_BadLocalConstFlags1, asNew.NewExpression.NewKeyword.ToString()) 1597ReportDiagnostic(diagnostics, identifier, ERRID.ERR_CannotInferNullableForVariable1, name.Identifier.ToString()) 1610ReportDiagnostic(diagnostics, identifier, ERRID.ERR_CannotInferNullableForVariable1, identifier.ToString()) 1650ReportDiagnostic(diagnostics, identifier, ERRID.ERR_CannotInferNullableForVariable1, identifier.ToString()) 1659ReportDiagnostic(diagnostics, name, ERRID.ERR_TypeInferenceArrayRankMismatch1, name.Identifier.ToString()) 2296node.AddHandlerOrRemoveHandlerKeyword.ToString, 2552node.RaiseEventKeyword.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())
CommandLine\VisualBasicCommandLineParser.vb (1)
1898parsedTokensAsString.Append(tokens.Current.ToString)
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (1)
325value = nameAttr.Reference.Identifier.ToString() ' TODO: revise
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\ImplementsHelper.vb (1)
108Binder.ReportDiagnostic(diagBag, implementsClause, errorid, implementsClause.ImplementsKeyword.ToString())
Symbols\Source\SourceMemberMethodSymbol.vb (2)
368syntax.Identifier.GetLocation(), syntax.Identifier.ToString()) 401syntax.Identifier.ToString())
Symbols\Source\SourceMethodSymbol.vb (1)
103binder.ReportDiagnostic(diagBag, syntax.HandlesClause, ERRID.ERR_BadInterfaceMethodFlags1, syntax.HandlesClause.HandlesKeyword.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)
463diagnostics.Add(ERRID.ERR_SetHasToBeByVal1, location, token.ToString())
Symbols\Source\SourcePropertySymbol.vb (1)
1112syntax.Identifier.ToString())
Syntax\SyntaxNodeExtensions.vb (1)
113If Not Scanner.IsIdentifier(xmlNameInferredFrom.LocalName.ToString) Then
VisualBasicExtensions.vb (1)
387token.ToString()),
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (7)
ExpressionSyntaxExtensions.vb (1)
49If String.Compare(identifierName.Identifier.ToString(), "New", StringComparison.OrdinalIgnoreCase) <> 0 Then
NameSyntaxComparer.vb (1)
108result.Add(SyntaxFactory.IdentifierName(SyntaxFactory.Identifier(globalName.GlobalKeyword.ToString())))
SyntaxTokenExtensions.vb (1)
31Return String.Equals(token.ToString(), SyntaxFacts.GetText(kind), StringComparison.OrdinalIgnoreCase)
SyntaxTreeExtensions.vb (1)
234(token.Span.Length > startLength AndAlso Not token.ToString().EndsWith(lastChar, StringComparison.Ordinal)))
TokenComparer.vb (2)
28Dim token1IsSystem = IsSystem(token1.ToString()) 29Dim token2IsSystem = IsSystem(token2.ToString())
VisualBasicSyntaxFacts.vb (1)
469Return IsIdentifier(token) AndAlso Not token.ContainsDiagnostics AndAlso token.ToString().Length = identifier.Length
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
CallStatementSyntaxExtensions.vb (1)
16Not SyntaxFacts.GetContextualKeywordKind(nextToken.ToString()) = SyntaxKind.MidKeyword Then
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (3)
EndConstructGeneration\EndConstructStatementVisitor.vb (2)
50Return New SpitLinesResult({"", aligningWhitespace & "End " & node.EnumKeyword.ToString()}) 97Return 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.EditorFeatures.UnitTests (5)
Extensions\StatementSyntaxExtensionTests.vb (5)
16Dim actual = newNode.GetModifiers().First().ToString() 23Assert.Equal(expectedName, actualNameToken.ToString()) 63Dim actual = newNode.GetModifiers().First().ToString() 71Dim actualModifierName = node.Modifiers().First().ToString() 79Dim actualModifierName = node.Modifiers().First().ToString()
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (2)
CodeGen\CodeGenTuples.vb (1)
21552Assert.Equal("x", x.Identifier.ToString())
Emit\EditAndContinue\EditAndContinueTestBase.vb (1)
107Return DirectCast(node, ModifiedIdentifierSyntax).Identifier.ToString()
Microsoft.CodeAnalysis.VisualBasic.Features (13)
BraceCompletion\BracketBraceCompletionService.vb (1)
46token.ToString() = Bracket.OpenCharacter Then
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (1)
95insertionText:=parameter.Name.ToIdentifierToken().ToString() & textSuffix,
Completion\KeywordRecommenders\Expressions\BinaryOperatorKeywordRecommender.vb (1)
57Dim text = token.ToString()
DocumentationComments\VisualBasicDocumentationCommentSnippetService.vb (3)
122list.Add("''' <typeparam name=""" & typeParam.Identifier.ToString() & """></typeparam>") 129list.Add("''' <param name=""" & param.Identifier.Identifier.ToString() & """></param>") 211If textTokens.Any(Function(t) Not String.IsNullOrWhiteSpace(t.ToString())) Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
1247If Not String.Equals(memberAccess.Name.Identifier.ToString(), "New", StringComparison.OrdinalIgnoreCase) Then
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (1)
80name:=_methodName.ToString(),
QuickInfo\VisualBasicSemanticQuickInfoProvider.vb (1)
117If SyntaxFacts.GetContextualKeywordKind(token.ToString()) = SyntaxKind.MidKeyword Then
SignatureHelp\AttributeSignatureHelpProvider.vb (1)
154namedParameter, namedParameter.Name.ToIdentifierToken.ToString()))
Structure\Providers\RegionDirectiveStructureProvider.vb (3)
16Dim text = regionDirective.Name.ToString().Trim(""""c) 19Return regionDirective.HashToken.ToString() & regionDirective.RegionKeyword.ToString()
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (62)
Parser\ParseDirectives.vb (1)
1691Assert.Equal("[WARNING]", disableNode.ErrorCodes.Single.Identifier.ToString)
Scanner\ScannerTests.vb (1)
1898Assert.Equal("""Hello," & vbLf & "World!""", token.ToString())
Syntax\ManualTests.vb (1)
228Assert.Equal(">", token.ToString())
Syntax\SyntaxFactsTest.vb (1)
1050builder.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 (45)
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()) 1925Assert.Equal("xxxx", tk0.ToString) 1934Assert.Equal("Dim", tk_nonzero1.ToString) 1937Assert.Equal("yyyy", tk_nonzero2.ToString) 1940Assert.Equal("yyyy", tk_zero1.ToString) 1955Assert.Equal("Dim", tk0.ToString) 1958Assert.Equal("xxxx", tk_nonzero1.ToString) 1964Assert.Equal("dim", tk_nonzero3.ToString) 1967Assert.Equal("dim", tk_zero1.ToString) 1970Assert.Equal("Module1", tk_zero2.ToString) 2525Assert.Equal("Imports", token.ToString()) 2536Dim b = expr.DescendantTokens().Where(Function(t) t.ToString() = "b").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2550Dim n = expr.DescendantTokens().Where(Function(t) t.ToString() = "b").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2564Dim b = expr.DescendantTokens().Where(Function(t) t.ToString() = "b").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2578Dim b = expr.DescendantTokens().Where(Function(t) t.ToString() = "b").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2591Dim n = expr.DescendantTokens().Where(Function(t) t.ToString() = "a").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2604Dim n = expr.DescendantTokens().Where(Function(t) t.ToString() = "a").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2617Dim n = expr.DescendantTokens().Where(Function(t) t.ToString() = "c").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ArgumentSyntax)()).FirstOrDefault() 2641Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "A").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of AttributeListSyntax)()).FirstOrDefault() 2666Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "C").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of AttributeListSyntax)()).FirstOrDefault() 2691Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "B").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of AttributeListSyntax)()).FirstOrDefault() 2722Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "Goo").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ClassBlockSyntax)()).FirstOrDefault() 2761Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "Goo").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ClassBlockSyntax)()).FirstOrDefault() 2803Dim n = cu.DescendantTokens().Where(Function(t) t.ToString() = "Goo").Select(Function(t) t.Parent.FirstAncestorOrSelf(Of ClassBlockSyntax)()).FirstOrDefault()
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
ParserTestUtilities.vb (2)
768Assert.Equal(tk.ToString().Trim(), tk.ToString())
Microsoft.CodeAnalysis.VisualBasic.Workspaces (18)
CallStatementSyntaxExtensions.vb (1)
16Not SyntaxFacts.GetContextualKeywordKind(nextToken.ToString()) = SyntaxKind.MidKeyword Then
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (3)
254Dim actualText = token.ToString() 275Dim actualText = token.ToString() 290Dim actualText = token.ToString()
Classification\ClassificationHelpers.vb (2)
222ElseIf (identifier.ToString() = "IsTrue" OrElse identifier.ToString() = "IsFalse") AndAlso
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (1)
280Dim actualText = token.ToString()
CodeGeneration\EnumMemberGenerator.vb (1)
106Dim numericText = numericToken.ToString()
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
2910Dim typeParameter = typeParameterList.Parameters.FirstOrDefault(Function(tp) tp.Identifier.ToString() = typeParameterName)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb\ExpressionSyntaxExtensions.vb (1)
49If String.Compare(identifierName.Identifier.ToString(), "New", StringComparison.OrdinalIgnoreCase) <> 0 Then
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTokenExtensions.vb\SyntaxTokenExtensions.vb (1)
31Return String.Equals(token.ToString(), SyntaxFacts.GetText(kind), StringComparison.OrdinalIgnoreCase)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb\SyntaxTreeExtensions.vb (1)
234(token.Span.Length > startLength AndAlso Not token.ToString().EndsWith(lastChar, StringComparison.Ordinal)))
NameSyntaxComparer.vb (1)
108result.Add(SyntaxFactory.IdentifierName(SyntaxFactory.Identifier(globalName.GlobalKeyword.ToString())))
Rename\VisualBasicRenameRewriterLanguageService.vb (2)
563If(oldToken.GetTypeCharacter() = TypeCharacter.None, currentNewIdentifier, currentNewIdentifier + oldToken.ToString().Last()), 591Dim originalString = newToken.ToString()
TokenComparer.vb (2)
28Dim token1IsSystem = IsSystem(token1.ToString()) 29Dim token2IsSystem = IsSystem(token2.ToString())
VisualBasicSyntaxFacts.vb (1)
469Return IsIdentifier(token) AndAlso Not token.ContainsDiagnostics AndAlso token.ToString().Length = identifier.Length
Microsoft.CodeAnalysis.Workspaces (9)
AbstractDocumentationCommentService.cs (1)
166var tokenText = token.ToString();
AbstractFormatEngine.cs (2)
490_startToken.ToString().Replace("\r\n", "\\r\\n"), 491_endToken.ToString().Replace("\r\n", "\\r\\n"));
AbstractIndentation.Indenter.cs (1)
137while (token != default && string.IsNullOrWhiteSpace(token.ToString()))
AbstractTriviaFormatter.cs (1)
897var tokenText = this.Token1.ToString();
FormattingExtensions.cs (1)
154spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
ISyntaxFactsExtensions.cs (1)
111if (!IsOnSingleLine(token.ToString()))
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
365.Select(t => Tuple.Create(t.ToString(), t.Span.Start, t.Span));
TokenStream.cs (1)
321var text = token.ToString();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
61var type = tree.GetRoot().DescendantTokens().First(t => t.ToString() == "class").Parent; 425var type = tree.GetRoot().DescendantTokens().First(t => t.ToString() == "class").Parent; 2813var 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.VisualStudio.LanguageServices.CSharp (24)
CodeModel\CSharpCodeModelService.CodeModelEventCollector.cs (8)
539if (!StringComparer.Ordinal.Equals(oldType.Identifier.ToString(), newType.Identifier.ToString())) 597if (!StringComparer.Ordinal.Equals(oldDelegate.Identifier.ToString(), newDelegate.Identifier.ToString())) 730return StringComparer.Ordinal.Equals(oldIdentifierName.Identifier.ToString(), newIdentifierName.Identifier.ToString()); 743if (!StringComparer.Ordinal.Equals(oldGenericName.Identifier.ToString(), newGenericName.Identifier.ToString()))
CodeModel\CSharpCodeModelService.cs (14)
810return ((BaseTypeDeclarationSyntax)node).Identifier.ToString(); 812return ((DelegateDeclarationSyntax)node).Identifier.ToString(); 815((MethodDeclarationSyntax)node).Identifier.ToString(); 817return ((ConstructorDeclarationSyntax)node).Identifier.ToString(); 819return "~" + ((DestructorDeclarationSyntax)node).Identifier.ToString(); 822((PropertyDeclarationSyntax)node).Identifier.ToString(); 825((IndexerDeclarationSyntax)node).ThisKeyword.ToString(); 828((EventDeclarationSyntax)node).Identifier.ToString(); 835return "operator " + ((OperatorDeclarationSyntax)node).OperatorToken.ToString(); 842return ((EnumMemberDeclarationSyntax)node).Identifier.ToString(); 844return ((VariableDeclaratorSyntax)node).Identifier.ToString(); 1541if (parameter.Identifier.ToString() == name) 1687return attributeList.Target.Identifier.ToString(); 1863return parameter.Identifier.ToString();
CodeModel\MethodXml\MethodXmlBuilder.cs (2)
119GenerateName(variable.Identifier.ToString()); 535GenerateName(identifierName.Identifier.ToString());
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
GenerateType\GenerateTypeViewModelTests.vb (1)
845Dim typeName = token.ToString()
Microsoft.VisualStudio.LanguageServices.VisualBasic (51)
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\SnippetExpansionClient.vb (2)
225If Not aliasImports.Any(Function(a) ordinalIgnoreCaseStringComparer.Equals(a.Alias.Identifier.ToString(), simpleImportsClause.Alias.Identifier.ToString()) AndAlso
Venus\ContainedLanguageStaticEventBinding.vb (2)
46result.Add(Tuple.Create(handleClauseItem.EventMember.Identifier.ToString(), 47methodAndMethodSyntax.Item2.Identifier.ToString(),