Base:
620 references to ToString
GenerateDocumentationAndConfigFiles (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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()))
Metrics (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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()))
Metrics.Legacy (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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.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)
48return GetType().Name + " " + (Node != null ? Node.KindText : "None") + " " + ToString(); 154public string Text => ToString();
Microsoft.CodeAnalysis.Analyzers (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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.AnalyzerUtilities (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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.BannedApiAnalyzers (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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.CodeStyle (9)
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
151node.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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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 (6)
Binder\Binder_Symbols.cs (2)
501diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refToken.GetLocation(), refToken.ToString()); 515diagnostics.Add(ErrorCode.ERR_UnexpectedToken, scopedToken.GetLocation(), scopedToken.ToString());
Symbols\Source\SourceLabelSymbol.cs (1)
53return ((DefaultSwitchLabelSyntax)node).Keyword.ToString();
Symbols\Source\SourceMethodSymbol.cs (1)
39diagnostics.Add(ErrorCode.ERR_UnexpectedToken, refKeyword.GetLocation(), refKeyword.ToString());
Symbols\Symbol_Attributes.cs (1)
744targetOpt.Identifier.GetLocation(), targetOpt.Identifier.ToString(), allowedTargets.ToDisplayString());
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
186target.GetLocation(), target.ToString(), (AttributeOwner.AllowedAttributeLocations & ~AttributeLocation.Method).ToDisplayString());
Microsoft.CodeAnalysis.CSharp.Analyzers (1)
CSharpUpgradeMSBuildWorkspaceAnalyzer.cs (1)
23identifierName.Identifier.ToString() == MSBuildWorkspace)
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)
453return this.IsIdentifier(token) && !token.ContainsDiagnostics && token.ToString().Length == identifier.Length; 459return 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)
141var 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)
126return ((VariableDeclaratorSyntax)node).Identifier.ToString();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Semantics\RecordTests.cs (4)
1877Assert.Equal("Main", main.Identifier.ToString()); 8191Assert.Equal("Main", main.Identifier.ToString()); 8691Assert.Equal("Main", main.Identifier.ToString()); 8796Assert.Equal("Main", main.Identifier.ToString());
Microsoft.CodeAnalysis.CSharp.Features (14)
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (2)
166displayText: p.Name.ToIdentifierToken().ToString(), 189displayText: p.Name.ToIdentifierToken().ToString(),
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (1)
115var escapedName = parameter.Name.ToIdentifierToken().ToString();
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
333if (textTokens.Any(t => !string.IsNullOrWhiteSpace(t.ToString())))
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
102name: _methodName.ToString(),
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (2)
257var variableName = declaration.Declaration.Variables[0].Identifier.ToString(); 288var variableName = declaration.Declaration.Variables[0].Identifier.ToString();
SignatureHelp\AttributeSignatureHelpProvider.cs (1)
181namedParameter, namedParameter.Name.ToIdentifierToken().ToString()),
Snippets\CSharpConstructorSnippetProvider.cs (1)
72containingTypeName: containingType.Identifier.ToString(),
Snippets\CSharpForEachLoopSnippetProvider.cs (1)
115arrayBuilder.Add(new SnippetPlaceholder(node.Identifier.ToString(), node.Identifier.SpanStart));
Snippets\CSharpSnippetFunctionService.cs (1)
27return type?.Identifier.ToString();
SolutionExplorer\CSharpSolutionExplorerSymbolTreeItemProvider.cs (1)
224nameBuilder.Append(operatorDeclaration.OperatorToken.ToString());
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)
16796Assert.Equal("r1", lambdas[0].ParameterList.Parameters[0].Identifier.ToString()); 16799Assert.Equal("t1", lambdas[0].ParameterList.Parameters[1].Identifier.ToString()); 16803Assert.Equal("r2", lambdas[1].ParameterList.Parameters[0].Identifier.ToString()); 16806Assert.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 (351)
IncrementalParsing\NodeValidators.cs (1)
65Assert.Equal(genericName.Identifier.ToString(), name);
LexicalAndXml\LexicalTests.cs (1)
514Assert.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\IgnoredDirectiveParsingTests.cs (2)
130Assert.Equal("abc", content.ToString()); 152Assert.Equal("abc", content.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\ScriptParsingTests.cs (1)
10261Assert.Equal(expectedSkippedText, content.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();
Syntax\SyntaxTokenListTests.cs (3)
67Assert.Equal("A", list[0].ToString()); 68Assert.Equal("B", list[1].ToString()); 69Assert.Equal("C", list[2].ToString());
Microsoft.CodeAnalysis.CSharp.Workspaces (20)
Classification\ClassificationHelpers.cs (2)
457if (token.ToString() != token.ValueText) 541var tokenString = token.ToString();
CodeGeneration\CSharpSyntaxGenerator.cs (3)
916return (EnumMemberDeclarationSyntax)this.EnumMember(id.Identifier.ToString(), null); 923return (EnumMemberDeclarationSyntax)this.EnumMember(vd.Identifier.ToString(), vd.Initializer?.Value); 1868var clause = clauses.FirstOrDefault(c => c.Name.Identifier.ToString() == typeParameterName);
Rename\CSharpRenameRewriterLanguageService.cs (1)
636var originalString = newToken.ToString();
Simplification\CSharpSimplificationService.cs (1)
131syntaxToken.ToString(),
Simplification\Reducers\CSharpEscapingReducer.cs (2)
118var 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)
453return this.IsIdentifier(token) && !token.ContainsDiagnostics && token.ToString().Length == identifier.Length; 459return 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)
141var numericText = numericToken.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
51syntaxToken.ToString(),
Microsoft.CodeAnalysis.Features (4)
Completion\Providers\Scripting\AbstractDirectivePathCompletionProvider.cs (1)
46var literalValue = stringLiteral.ToString();
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (1)
62var numericText = numericToken.ToString();
Rename\SymbolicRenameInfo.cs (1)
173triggerToken.ToString().Equals("New", StringComparison.OrdinalIgnoreCase))
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
151node.GetFirstToken().ToString(),
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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.PublicApiAnalyzers (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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.ResxSourceGenerator (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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.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)
258diagnostics.Add(ERRID.ERR_EventMethodOptionalParamIllegal1, location, token.ToString()) 264diagnostics.Add(ERRID.ERR_EventMethodOptionalParamIllegal1, location, token.ToString()) 275diagnostics.Add(ERRID.ERR_EventAddRemoveByrefParamIllegal, location, token.ToString())
Symbols\Source\SourceNamedTypeSymbol.vb (8)
303id.ToString(), 320Binder.ReportDiagnostic(diagBag, id, ERRID.ERR_PartialTypeBadMustInherit1, id.ToString()) 389Binder.ReportDiagnostic(diagBag, id, ERRID.ERR_ShadowingTypeOutsideClass1, id.ToString()) 533Me.GetKindText(), id.ToString, _3rdArg, s.Name) 546_3rdArg, s.Name, Me.GetKindText(), id.ToString) 565Me.GetKindText(), id.ToString, _3rdArg, s.Name, 685Dim identifier As String = GetTypeIdentifierToken(firstNode).ToString 689nodeKindText, id.ToString,
Symbols\Source\SourcePropertyAccessorSymbol.vb (1)
468diagnostics.Add(ERRID.ERR_SetHasToBeByVal1, location, token.ToString())
VisualBasicExtensions.vb (1)
387token.ToString()),
Microsoft.CodeAnalysis.Workspaces (9)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
378.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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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)
68var type = tree.GetRoot().DescendantTokens().First(t => t.ToString() == "class").Parent; 448var type = tree.GetRoot().DescendantTokens().First(t => t.ToString() == "class").Parent; 2834var type = tree.GetRoot().DescendantTokens().First(t => t.ToString() == "class").Parent;
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SyntaxNodeTests.cs (2)
57return Task.FromResult<SyntaxNode>(classDecl.WithIdentifier(SyntaxFactory.Identifier(id.LeadingTrivia, id.ToString() + "1", id.TrailingTrivia))); 63return Task.FromResult<SyntaxNode>(varDecl.WithIdentifier(SyntaxFactory.Identifier(id.LeadingTrivia, id.ToString() + "1", id.TrailingTrivia)));
Microsoft.Extensions.Logging.Generators (3)
LoggerMessageGenerator.Parser.cs (3)
256Diag(DiagnosticDescriptors.MalformedFormatStrings, method.Identifier.GetLocation(), method.Identifier.ToString()); 330Diag(DiagnosticDescriptors.RedundantQualifierInMessage, ma.GetLocation(), method.Identifier.ToString()); 624return typeDeclaration.Identifier.ToString() + typeDeclaration.TypeParameterList;
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.MetadataExtractor (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
137Name = typeDeclaration.Identifier.ToString() + typeDeclaration.TypeParameterList, 159Name = parentMetricClass.Identifier.ToString() + parentMetricClass.TypeParameterList,
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()); 530GenerateName(identifierName.Identifier.ToString());
Roslyn.Diagnostics.Analyzers (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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()))
Roslyn.Diagnostics.CSharp.Analyzers (7)
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)
453return this.IsIdentifier(token) && !token.ContainsDiagnostics && token.ToString().Length == identifier.Length; 459return 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)
141var numericText = numericToken.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
51syntaxToken.ToString(),
Test.Utilities (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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()))
Text.Analyzers (8)
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)
319var text = token.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
136spaceOrIndentation = text.ConvertTabToSpace(tabSize, baseToken.ToString().GetTextColumn(tabSize, initialColumn), text.Length);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
896var tokenText = this.Token1.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
137while (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()))