184 references to ToFullString
Microsoft.CodeAnalysis.CodeStyle (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.StructuredTrivia.cs (1)
43var text = _trivia.ToFullString()[..(token.SpanStart - _trivia.FullSpan.Start)];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (4)
665if (changes[i].ToFullString().ContainsLineBreak()) 887var text = trivia2.ToFullString(); 906var text = trivia.ToFullString(); 913var text = trivia.ToFullString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (3)
216builder.Append(trivia.ToFullString()); 238builder.Append(trivia.ToFullString()); 251builder.Append(trivia.ToFullString());
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (3)
136possibleLeadingSpaces = triviaLine.ToFullString(); 167var newHeaderTrivia = CreateNewHeader(syntaxFacts, leadingSpaces + fileHeaderHelper.CommentPrefix, expectedFileHeader, newLineTrivia.ToFullString()); 178var newTrivia = CreateNewHeader(syntaxFacts, fileHeaderHelper.CommentPrefix, expectedFileHeader, newLineTrivia.ToFullString()).Add(newLineTrivia).Add(newLineTrivia);
Microsoft.CodeAnalysis.CSharp (1)
Syntax\SyntaxNormalizer.cs (1)
1236var text = trivia.ToFullString();
Microsoft.CodeAnalysis.CSharp.CodeStyle (12)
src\Analyzers\CSharp\Analyzers\FileHeaders\CSharpFileHeaderHelper.cs (2)
25return commentTrivia.ToFullString().AsMemory()[2..]; 29var triviaString = commentTrivia.ToFullString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
95var parsed = SyntaxFactory.ParseStatement(nextTrivia.ToFullString());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (2)
50var text = trivia.ToFullString(); 126trivia.Select(t => t.ToFullString()).Do(s => sb.Append(s));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (4)
216var multiLineComment = trivia.ToFullString().ReindentStartOfXmlDocumentationComment( 269changes.Add(new TextChange(trivia.FullSpan, newComment.ToFullString())); 282var text = trivia.ToFullString(); 379changes.Add(new TextChange(trivia.FullSpan, docComment.ToFullString()));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.DocumentationCommentExteriorCommentRewriter.cs (1)
43var triviaText = trivia.ToFullString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (1)
140Debug.Assert(trivia.ToString() == trivia.ToFullString());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
487=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\Analyzers\FileHeaders\CSharpFileHeaderHelper.cs (2)
25return commentTrivia.ToFullString().AsMemory()[2..]; 29var triviaString = commentTrivia.ToFullString();
TaskList\CSharpTaskListService.cs (1)
38var message = trivia.ToFullString();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (96)
LexicalAndXml\LexicalTests.cs (25)
173Assert.Equal(text, trivia.ToFullString()); 4175Assert.Equal("======= Trailing", trivia.ToFullString()); 4189""", trivia.ToFullString()); 4193Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString()); 4215Assert.Equal("======= Trailing", trivia.ToFullString()); 4229""", trivia.ToFullString()); 4233Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString()); 4384Assert.Equal("||||||| Mid", trivia.ToFullString()); 4393Assert.Equal("======= Trailing", trivia.ToFullString()); 4402Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString()); 4423Assert.Equal("||||||| Mid", trivia.ToFullString()); 4435""", trivia.ToFullString()); 4439Assert.Equal("======= Trailing", trivia.ToFullString()); 4451""", trivia.ToFullString()); 4455Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString()); 4479Assert.Equal("||||||| Mid", trivia.ToFullString()); 4491""", trivia.ToFullString()); 4495Assert.Equal("======= Trailing", trivia.ToFullString()); 4509""", trivia.ToFullString()); 4513Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString()); 4537Assert.Equal("||||||| Mid", trivia.ToFullString()); 4551""", trivia.ToFullString()); 4555Assert.Equal("======= Trailing", trivia.ToFullString()); 4567""", trivia.ToFullString()); 4571Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString());
LexicalAndXml\PreprocessorTests.cs (10)
2107Assert.Equal("A//B", regionText.ToFullString()); 2129Assert.Equal("A/\\B", regionText.ToFullString()); 2217Assert.Equal("\"", regionText.ToFullString()); 2238Assert.Equal("\" ", regionText.ToFullString()); 2259Assert.Equal("\"goo\"", regionText.ToFullString()); 2280Assert.Equal("\"goo\" ", regionText.ToFullString()); 2301Assert.Equal("\"\"", regionText.ToFullString()); 2322Assert.Equal("\"\" ", regionText.ToFullString()); 2343Assert.Equal("\"\"\"", regionText.ToFullString()); 2364Assert.Equal("\"\"\" ", regionText.ToFullString());
LexicalAndXml\SyntaxTokenParserTests.cs (1)
423Assert.Equal(text, leadingTrivia[i].ToFullString());
LexicalAndXml\XmlDocCommentTests.cs (58)
84Assert.Equal(text, node.ToFullString()); 103Assert.Equal(text, leading[0].ToFullString()); 135Assert.Equal(text, leading[0].ToFullString()); 153Assert.Equal($"/// <goo />{Environment.NewLine}", node.ToFullString()); 174Assert.Equal(text, node.ToFullString()); 199Assert.Equal("/** <goo /> */", node.ToFullString()); 221Assert.Equal(text, node.ToFullString()); 244Assert.Equal(text, node.ToFullString()); 267Assert.Equal(text, node.ToFullString()); 294Assert.Equal(text, node.ToFullString()); 322Assert.Equal(text, node.ToFullString()); 346Assert.Equal($"/// <goo {Environment.NewLine}/// />{Environment.NewLine}", node.ToFullString()); 371Assert.Equal(text, node.ToFullString()); 397Assert.Equal($"/** <goo {Environment.NewLine} * />{Environment.NewLine} */", node.ToFullString()); 424Assert.Equal(text, node.ToFullString()); 451Assert.Equal(text, node.ToFullString()); 479Assert.Equal(text, node.ToFullString()); 508Assert.Equal(text, node.ToFullString()); 538Assert.Equal(text, node.ToFullString()); 567Assert.Equal(text, node.ToFullString()); 597Assert.Equal(text, node.ToFullString()); 628Assert.Equal(text, node.ToFullString()); 651Assert.Equal(text, node.ToFullString()); 673Assert.Equal(text, node.ToFullString()); 695Assert.Equal(text, node.ToFullString()); 717Assert.Equal(text, node.ToFullString()); 739Assert.Equal(text, node.ToFullString()); 759Assert.Equal(text, node.ToFullString()); 793Assert.Equal(text, node.ToFullString()); 826Assert.Equal(text, node.ToFullString()); 857Assert.Equal(text, node.ToFullString()); 885Assert.Equal(text, node.ToFullString()); 910Assert.Equal($"/// <![CDATA[ incomplete{Environment.NewLine}", node.ToFullString()); 936Assert.Equal("/// <![CDATA[ incomplete\u0085", node.ToFullString()); 961Assert.Equal(text, node.ToFullString()); 988Assert.Equal(text, node.ToFullString()); 1019Assert.Equal(text, node.ToFullString()); 1047Assert.Equal(text, node.ToFullString()); 1072Assert.Equal($"/// <!-- incomplete{Environment.NewLine}", node.ToFullString()); 1097Assert.Equal(text, node.ToFullString()); 1124Assert.Equal(text, node.ToFullString()); 1157Assert.Equal(text, node.ToFullString()); 1188Assert.Equal(text, node.ToFullString()); 1214Assert.Equal("/// <?name incomplete\u0085", node.ToFullString()); 1241Assert.Equal(text, node.ToFullString()); 1269Assert.Equal(text, node.ToFullString()); 1314Assert.Equal(text, node.ToFullString()); 1338Assert.Equal(text, node.ToFullString()); 1363Assert.Equal(text, node.ToFullString()); 1387Assert.Equal(text, node.ToFullString()); 1412Assert.Equal(text, node.ToFullString()); 1436Assert.Equal(text, node.ToFullString()); 1461Assert.Equal(text, node.ToFullString()); 1485Assert.Equal(text, node.ToFullString()); 1565Assert.Equal(text, node.ToFullString()); 1593Assert.Equal(text, node.ToFullString()); 1621Assert.Equal(text, node.ToFullString()); 1647Assert.Equal(text, node.ToFullString());
Syntax\StructuredTriviaTests.cs (1)
71Assert.Equal(" <goo> </goo> ", ident.LeadingTrivia[0].ToFullString());
Syntax\SyntaxNodeTests.cs (1)
3570Assert.Equal(" ", trivia.ToFullString());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
494var text = trivia.ToFullString();
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
Classification\Worker.cs (1)
285foreach (var token in SyntaxFactory.ParseTokens(text: trivia.ToFullString(), initialTokenPosition: trivia.SpanStart))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
95var parsed = SyntaxFactory.ParseStatement(nextTrivia.ToFullString());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (2)
50var text = trivia.ToFullString(); 126trivia.Select(t => t.ToFullString()).Do(s => sb.Append(s));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (4)
216var multiLineComment = trivia.ToFullString().ReindentStartOfXmlDocumentationComment( 269changes.Add(new TextChange(trivia.FullSpan, newComment.ToFullString())); 282var text = trivia.ToFullString(); 379changes.Add(new TextChange(trivia.FullSpan, docComment.ToFullString()));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.DocumentationCommentExteriorCommentRewriter.cs (1)
43var triviaText = trivia.ToFullString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (1)
140Debug.Assert(trivia.ToString() == trivia.ToFullString());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (1)
487=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
Microsoft.CodeAnalysis.Features (8)
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (1)
100var bannerText = banner.Select(trivia => trivia.ToFullString()).Join(string.Empty);
AddFileBanner\AddFileBannerHelpers.cs (1)
62var updated = createTrivia(trivia, trivia.ToFullString().Replace(sourceName, destinationName));
MetadataAsSource\AbstractMetadataAsSourceService.AbstractMetadataFormattingRule.cs (1)
58count += trivia.ToFullString().Replace("\r\n", "\r").ToCharArray().Count(IsNewLine);
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (3)
136possibleLeadingSpaces = triviaLine.ToFullString(); 167var newHeaderTrivia = CreateNewHeader(syntaxFacts, leadingSpaces + fileHeaderHelper.CommentPrefix, expectedFileHeader, newLineTrivia.ToFullString()); 178var newTrivia = CreateNewHeader(syntaxFacts, fileHeaderHelper.CommentPrefix, expectedFileHeader, newLineTrivia.ToFullString()).Add(newLineTrivia).Add(newLineTrivia);
TaskList\AbstractTaskListService.cs (1)
131var fullString = trivia.ToFullString();
Wrapping\Edit.cs (1)
47result.Builder.Append(trivia.ToFullString());
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (1)
213context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, comment.GetLocation(), messageArgs: comment.ToFullString()));
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\SyntaxNormalizer.vb (1)
624Dim text As String = trivia.ToFullString()
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (9)
src\Analyzers\VisualBasic\Analyzers\FileHeaders\VisualBasicFileHeaderHelper.vb (1)
29Return commentTrivia.ToFullString().AsMemory().Slice(1)
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.vb (1)
66result.HasTrailingSpace = trivia.ToFullString().Length <> 3
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.vb (2)
111Debug.Assert(trivia.ToString() = trivia.ToFullString()) 186If trivia.ToFullString().Length <> 3 Then
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\VisualBasicTriviaFormatter.vb (5)
186changes.Add(New TextChange(trivia.FullSpan, lineContinuation.ToFullString())) 196If trivia.ToFullString() <> _lineContinuationTrivia.ToFullString() Then 257changes.Add(New TextChange(trivia.FullSpan, docComment.ToFullString())) 267Dim text = trivia.ToFullString()
Microsoft.CodeAnalysis.VisualBasic.Features (1)
src\Analyzers\VisualBasic\Analyzers\FileHeaders\VisualBasicFileHeaderHelper.vb (1)
29Return commentTrivia.ToFullString().AsMemory().Slice(1)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (11)
Syntax\SyntaxFactsTest.vb (4)
1047builder.Append(trivia.ToFullString()) 1066builder.Append(trivia.ToFullString()) 1074builder.Append(trivia.ToFullString()) 1078builder.Append(trivia.ToFullString())
TestSyntaxNodes.vb (7)
707Assert.Equal("AAA", follTrivia(0).ToFullString) 713Assert.Equal("B", follTrivia(1).ToFullString) 738Assert.Equal("CCCC", precTrivia(0).ToFullString) 744Assert.Equal("DD", precTrivia(1).ToFullString) 750Assert.Equal("AAA", precTrivia(2).ToFullString) 759Assert.Equal("B", follTrivia(0).ToFullString) 1803Assert.Equal(" <goo> </ > ", ident.LeadingTrivia()(0).ToFullString)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (9)
Classification\Worker.vb (1)
163For Each token In SyntaxFactory.ParseTokens(trivia.ToFullString(), initialTokenPosition:=trivia.SpanStart)
Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.vb (1)
66result.HasTrailingSpace = trivia.ToFullString().Length <> 3
Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.vb (2)
111Debug.Assert(trivia.ToString() = trivia.ToFullString()) 186If trivia.ToFullString().Length <> 3 Then
Formatting\Engine\Trivia\VisualBasicTriviaFormatter.vb (5)
186changes.Add(New TextChange(trivia.FullSpan, lineContinuation.ToFullString())) 196If trivia.ToFullString() <> _lineContinuationTrivia.ToFullString() Then 257changes.Add(New TextChange(trivia.FullSpan, docComment.ToFullString())) 267Dim text = trivia.ToFullString()
Microsoft.CodeAnalysis.Workspaces (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.StructuredTrivia.cs (1)
43var text = _trivia.ToFullString()[..(token.SpanStart - _trivia.FullSpan.Start)];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (4)
665if (changes[i].ToFullString().ContainsLineBreak()) 887var text = trivia2.ToFullString(); 906var text = trivia.ToFullString(); 913var text = trivia.ToFullString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (3)
216builder.Append(trivia.ToFullString()); 238builder.Append(trivia.ToFullString()); 251builder.Append(trivia.ToFullString());
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
Help\VisualBasicHelpContextService.vb (1)
55Dim text = If(trivia.ToFullString(), String.Empty).Replace(" ", "").TrimStart("'"c)