Skip to main content

WorkspaceExtensions.ReplaceModifiersAsync Method

Containing Type: WorkspaceExtensions

Assembly: Roslynator.CSharp.Workspaces.dll

Overloads

MethodSummary
ReplaceModifiersAsync(Document, ModifierListInfo, IEnumerable<SyntaxToken>, CancellationToken)Creates a new document with the specified modifiers replaced with new modifiers.
ReplaceModifiersAsync(Document, ModifierListInfo, SyntaxTokenList, CancellationToken)Creates a new document with the specified modifiers replaced with new modifiers.

ReplaceModifiersAsync(Document, ModifierListInfo, IEnumerable<SyntaxToken>, CancellationToken)

Creates a new document with the specified modifiers replaced with new modifiers.

public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReplaceModifiersAsync(this Microsoft.CodeAnalysis.Document document, Roslynator.CSharp.Syntax.ModifierListInfo modifiersInfo, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxToken> newModifiers, System.Threading.CancellationToken cancellationToken = default)

Parameters

document Document

modifiersInfo ModifierListInfo

newModifiers IEnumerable<SyntaxToken>

cancellationToken CancellationToken

Returns

Task<Document>

ReplaceModifiersAsync(Document, ModifierListInfo, SyntaxTokenList, CancellationToken)

Creates a new document with the specified modifiers replaced with new modifiers.

public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.Document> ReplaceModifiersAsync(this Microsoft.CodeAnalysis.Document document, Roslynator.CSharp.Syntax.ModifierListInfo modifiersInfo, Microsoft.CodeAnalysis.SyntaxTokenList newModifiers, System.Threading.CancellationToken cancellationToken = default)

Parameters

document Document

modifiersInfo ModifierListInfo

newModifiers SyntaxTokenList

cancellationToken CancellationToken

Returns

Task<Document>