Skip to main content

ModifierList Class

Namespace: Roslynator.CSharp

Assembly: Roslynator.CSharp.dll

A set of static methods that allows manipulation with modifiers.

public static class ModifierList

Methods

MethodSummary
GetInsertIndex(SyntaxTokenList, SyntaxKind, IComparer<SyntaxKind>)Returns an index a token with the specified kind should be inserted at.
GetInsertIndex(SyntaxTokenList, SyntaxToken, IComparer<SyntaxToken>)Returns an index the specified token should be inserted at.
Insert(SyntaxTokenList, SyntaxKind, IComparer<SyntaxKind>)Creates a new list of modifiers with the modifier of the specified kind inserted.
Insert(SyntaxTokenList, SyntaxToken, IComparer<SyntaxToken>)Creates a new list of modifiers with a specified modifier inserted.
Insert<TNode>(TNode, SyntaxKind, IComparer<SyntaxKind>)Creates a new node with a modifier of the specified kind inserted.
Insert<TNode>(TNode, SyntaxToken, IComparer<SyntaxToken>)Creates a new node with the specified modifier inserted.
Remove<TNode>(TNode, SyntaxKind)Creates a new node with a modifier of the specified kind removed.
Remove<TNode>(TNode, SyntaxToken)Creates a new node with the specified modifier removed.
RemoveAll<TNode>(TNode, Func<SyntaxToken, Boolean>)Creates a new node with modifiers that matches the predicate removed.
RemoveAll<TNode>(TNode)Creates a new node with all modifiers removed.
RemoveAt<TNode>(TNode, Int32)Creates a new node with a modifier at the specified index removed.