Base:
91 references to ToString
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
393var actualLine = textLine.ToString().Trim().ReplaceLineEndings();
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
393var actualLine = textLine.ToString().Trim().ReplaceLineEndings();
Microsoft.CodeAnalysis (4)
CommandLine\AnalyzerConfig.cs (1)
209string line = textLine.ToString();
Syntax\SyntaxTreeExtensions.cs (1)
74message = $"Unexpected difference at offset {index}: Line {position.Line + 1}, Column {position.Character + 1} \"{line.ToString()}\" (Found: [{found}] Expected: [{expected}])";
Text\CompositeText.cs (1)
533Debug.Assert(resultLine.ToString().All(static c => !TextUtilities.IsAnyLineBreakCharacter(c)));
Text\SubText.cs (1)
192Debug.Assert(resultLine.ToString().All(static c => !TextUtilities.IsAnyLineBreakCharacter(c)));
Microsoft.CodeAnalysis.CodeStyle (10)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
74message = $"Unexpected difference at offset {index}: Line {position.Line + 1}, Column {position.Character + 1} \"{line.ToString()}\" (Found: [{found}] Expected: [{expected}])";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigParser.cs (2)
56var line = textLine.ToString(); 121var fullText = activeLine.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (2)
25return line.ToString(); 28var lineText = line.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextLineExtensions.cs (4)
60=> line.ToString().GetLeadingWhitespace(); 81=> line.ToString().GetColumnOfFirstNonWhitespaceCharacterOrEndOfLine(tabSize); 84=> line.ToString().GetColumnFromLineOffset(lineOffset, tabSize); 87=> line.ToString().GetLineOffsetFromColumn(column, tabSize);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
87text = prefix + " " + line.ToString()[(spanStart - line.Start)..].Trim() + " " + Ellipsis;
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (2)
269var topText = startLine.ToString()[s_mergeConflictLength..].Trim(); 274var bottomText = endLine.ToString()[s_mergeConflictLength..].Trim();
Microsoft.CodeAnalysis.CSharp.Features (3)
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (1)
470var lineText = lineContainingPosition.ToString();
EditAndContinue\BreakpointSpans.cs (1)
44var text = line.ToString();
LineSeparators\CSharpLineSeparatorService.cs (1)
338if (string.IsNullOrWhiteSpace(syntaxTree.GetText(cancellationToken).Lines[line + 1].ToString()))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
IncrementalParsing\IncrementalParsingTests.cs (2)
625Assert.EndsWith("{", openBraceLine.ToString()); 837Assert.EndsWith("}", closeBraceLine.ToString());
Microsoft.CodeAnalysis.EditorFeatures (6)
DocumentationComments\AbstractDocumentationCommentCommandHandler.cs (1)
358var lineText = line.ToString();
EditorConfigSettings\Updater\SettingsUpdateHelper.cs (5)
174var curLineText = curLine.ToString(); 301if (lastValidSpecificHeaderSpanEnd.Value.ToString().Trim().Length != 0) 310if (lastValidHeaderSpanEnd.Value.ToString().Trim().Length != 0) 325if (lastLine.ToString().Trim().Length != 0) 331if (lines.Count > 1 && lastLine.ToString().Trim().Length == 0)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
EditorAdapter\TextSnapshotImplementationTest.cs (2)
45Assert.Equal("goo", line1.ToString()); 56Assert.Equal("bar", line1.ToString());
MetadataAsSource\AbstractMetadataAsSourceTests.cs (1)
62var lineText = line.ToString().Trim();
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
85Boolean.TryParse(text.Lines(0).ToString(), serializationAllowed)
Microsoft.CodeAnalysis.Features (12)
CodeFixes\Configuration\ConfigurationUpdater.cs (5)
452var curLineText = curLine.ToString(); 715if (lastValidSpecificHeaderSpanEnd.Value.ToString().Trim().Length != 0) 725if (lastValidHeaderSpanEnd.Value.ToString().Trim().Length != 0) 743if (lastLine.ToString().Trim().Length != 0) 749if (lines.Count > 1 && lastLine.ToString().Trim().Length == 0)
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (4)
367var previousLineText = previousLine.ToString().Trim(); 374text.Lines[currentLine.LineNumber + 1].ToString().Trim().StartsWith(ExteriorTriviaText, StringComparison.Ordinal); 379string.IsNullOrWhiteSpace(currentLine.ToString()) && 413var previousLineText = previousLine.ToString();
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (2)
269var topText = startLine.ToString()[s_mergeConflictLength..].Trim(); 274var bottomText = endLine.ToString()[s_mergeConflictLength..].Trim();
TaskList\AbstractTaskListService.cs (1)
151var message = line.ToString();
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\ActiveStatementTestHelpers.cs (1)
114=> text.Lines[span.Start.Line].ToString().Trim();
EditAndContinue\Extensions.cs (1)
33firstLine: includeFirstLines ? newSource.Lines.GetLineFromPosition(d.Span.Start).ToString().Trim() : null));
Microsoft.CodeAnalysis.Test.Utilities (3)
Diagnostics\DiagnosticDescription.cs (1)
543assertText.AppendLine(l.SourceTree.GetText().Lines.GetLineFromPosition(l.SourceSpan.Start).ToString());
Metadata\ILValidation.cs (2)
436var start = subtext.Lines[0].ToString(); 437var end = subtext.Lines[^1].ToString();
Microsoft.CodeAnalysis.UnitTests (17)
Text\LargeTextTests.cs (6)
167Assert.Equal(lineText, textLine.ToString()); 168Assert.Equal(text.ToString().Substring(start, length), textLine.ToString()); 316Assert.Equal("goo", data.Lines[0].ToString()); 317Assert.Equal("bar baz", data.Lines[1].ToString()); 325Assert.Equal("goo", data.Lines[0].ToString()); 337Assert.Equal("goo", actualSourceText.Lines[0].ToString());
Text\StringText_LineTest.cs (3)
54Assert.Equal("goo", line.ToString()); 85Assert.Equal("", line.ToString()); 99Assert.Equal("", line.ToString());
Text\StringTextTest.cs (5)
120Assert.Equal(lineText, textLine.ToString()); 121Assert.Equal(text.ToString().Substring(start, length), textLine.ToString()); 209Assert.Equal("goo", data.Lines[0].ToString()); 210Assert.Equal("bar baz", data.Lines[1].ToString()); 218Assert.Equal("goo", data.Lines[0].ToString());
Text\StringTextTests_Default.cs (3)
101Assert.Equal("goo", data.Lines[0].ToString()); 102Assert.Equal("bar baz", data.Lines[1].ToString()); 109Assert.Equal("goo", data.Lines[0].ToString());
Microsoft.CodeAnalysis.VisualBasic (1)
CommandLine\CommandLineDiagnosticFormatter.vb (1)
77sb.AppendLine(line.ToString().Replace(vbTab, " ")) ' normalize tabs with 4 spaces
Microsoft.CodeAnalysis.VisualBasic.Features (3)
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.MoveToLineCodeAction.vb (1)
39Dim textWithMovedLine = textWithoutLine.WithChanges(New TextChange(TextSpan.FromBounds(destinationLineSpan, destinationLineSpan), textLineToMove.ToString().TrimStart() + vbCrLf))
EditAndContinue\BreakpointSpans.vb (1)
35Dim text = line.ToString()
Structure\Providers\XmlExpressionStructureProvider.vb (1)
28Dim lineText = line.ToString().Substring(span.Start - line.Start)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
CompilationTestUtils.vb (1)
1027Return textLine.ToString()
Microsoft.CodeAnalysis.Workspaces (10)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
74message = $"Unexpected difference at offset {index}: Line {position.Line + 1}, Column {position.Character + 1} \"{line.ToString()}\" (Found: [{found}] Expected: [{expected}])";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigParser.cs (2)
56var line = textLine.ToString(); 121var fullText = activeLine.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (2)
25return line.ToString(); 28var lineText = line.ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextLineExtensions.cs (4)
60=> line.ToString().GetLeadingWhitespace(); 81=> line.ToString().GetColumnOfFirstNonWhitespaceCharacterOrEndOfLine(tabSize); 84=> line.ToString().GetColumnFromLineOffset(lineOffset, tabSize); 87=> line.ToString().GetLineOffsetFromColumn(column, tabSize);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
87text = prefix + " " + line.ToString()[(spanStart - line.Start)..].Trim() + " " + Ellipsis;
Microsoft.DotNet.CodeAnalysis (3)
Analyzers\BaseAnalyzer.cs (1)
29if (StringComparer.OrdinalIgnoreCase.Equals(line.ToString(), GetType().Name))
Analyzers\MembersMustExistAnalyzer.cs (1)
74string lineStr = line.ToString();
Analyzers\PinvokeAnalyzer.cs (1)
79string lineStr = line.ToString();
Microsoft.VisualStudio.LanguageServices (2)
CodeLens\RemoteCodeLensReferencesService.cs (1)
250return lines[index].ToString().TrimEnd();
Progression\GraphQueries\IsUsedByGraphQuery.cs (1)
56var lineText = location.SourceTree.GetText(cancellationToken).Lines[span.StartLinePosition.Line].ToString();
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.NodeLocator.cs (1)
188var lineText = lineAfterOpenBrace.ToString();
Microsoft.VisualStudio.LanguageServices.UnitTests (3)
Venus\DocumentService_IntegrationTests.vb (3)
90(definitionDocument.Name, definitionText.Lines.GetLinePositionSpan(definitionSpan).Start, definitionText.Lines.GetLineFromPosition(definitionSpan.Start).ToString().Trim()), 91(definitionDocument.Name, definitionText.Lines.GetLinePositionSpan(referenceSpan).Start, definitionText.Lines.GetLineFromPosition(referenceSpan.Start).ToString().Trim())} 155Dim expected = {(definitionDocument.Name, definitionText.Lines.GetLinePositionSpan(referenceSpan).Start, definitionText.Lines.GetLineFromPosition(referenceSpan.Start).ToString())}