WorkspaceExtensions.ReplaceTriviaAsync Method
Containing Type: WorkspaceExtensions
Assembly: Roslynator.Workspaces.Core.dll
Overloads
Method | Summary |
---|---|
ReplaceTriviaAsync(Document, SyntaxTrivia, IEnumerable<SyntaxTrivia>, CancellationToken) | Creates a new document with the specified old trivia replaced with a new trivia. |
ReplaceTriviaAsync(Document, SyntaxTrivia, SyntaxTrivia, CancellationToken) | Creates a new document with the specified old trivia replaced with a new trivia. |
ReplaceTriviaAsync(Document, SyntaxTrivia, IEnumerable<SyntaxTrivia>, CancellationToken)
Creates a new document with the specified old trivia replaced with a new trivia.
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReplaceTriviaAsync(this Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.SyntaxTrivia oldTrivia, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxTrivia> newTrivia, System.Threading.CancellationToken cancellationToken = default)
Parameters
document Document
oldTrivia SyntaxTrivia
newTrivia IEnumerable<SyntaxTrivia>
cancellationToken CancellationToken
Returns
ReplaceTriviaAsync(Document, SyntaxTrivia, SyntaxTrivia, CancellationToken)
Creates a new document with the specified old trivia replaced with a new trivia.
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReplaceTriviaAsync(this Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.SyntaxTrivia oldTrivia, Microsoft.CodeAnalysis.SyntaxTrivia newTrivia, System.Threading.CancellationToken cancellationToken = default)
Parameters
document Document
oldTrivia SyntaxTrivia
newTrivia SyntaxTrivia
cancellationToken CancellationToken