Skip to main content

WorkspaceExtensions.ReplaceTokenAsync Method

Containing Type: WorkspaceExtensions

Assembly: Roslynator.Workspaces.Core.dll

Overloads​

MethodSummary
ReplaceTokenAsync(Document, SyntaxToken, IEnumerable<SyntaxToken>, CancellationToken)Creates a new document with the specified old token replaced with new tokens.
ReplaceTokenAsync(Document, SyntaxToken, SyntaxToken, CancellationToken)Creates a new document with the specified old token replaced with a new token.

ReplaceTokenAsync(Document, SyntaxToken, IEnumerable<SyntaxToken>, CancellationToken)​

Creates a new document with the specified old token replaced with new tokens.

public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReplaceTokenAsync(this Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.SyntaxToken oldToken, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> newTokens, System.Threading.CancellationToken cancellationToken = default)

Parameters​

document   Document

oldToken   SyntaxToken

newTokens   IEnumerable<SyntaxToken>

cancellationToken   CancellationToken

Returns​

Task<Document>

ReplaceTokenAsync(Document, SyntaxToken, SyntaxToken, CancellationToken)​

Creates a new document with the specified old token replaced with a new token.

public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReplaceTokenAsync(this Microsoft.CodeAnalysis.Document document, Microsoft.CodeAnalysis.SyntaxToken oldToken, Microsoft.CodeAnalysis.SyntaxToken newToken, System.Threading.CancellationToken cancellationToken = default)

Parameters​

document   Document

oldToken   SyntaxToken

newToken   SyntaxToken

cancellationToken   CancellationToken

Returns​

Task<Document>