WorkspaceSyntaxExtensions Class
Namespace: Roslynator.CSharp
Assembly: Roslynator.CSharp.Workspaces.dll
A set of extension methods for syntax. These methods are dependent on the workspace layer.
public static class WorkspaceSyntaxExtensions
Methods
Method | Summary |
---|---|
Parenthesize(ExpressionSyntax, Boolean, Boolean) | Creates parenthesized expression that is parenthesizing the specified expression. |
WithFormatterAnnotation(SyntaxToken) | Adds Formatter.Annotation to the specified token, creating a new token of the same type with the Formatter.Annotation on it. |
WithFormatterAnnotation<TNode>(TNode) | Creates a new node with the Formatter.Annotation attached. |
WithNavigationAnnotation(SyntaxToken) | Adds navigation annotation to the specified token, creating a new token of the same type with the navigation annotation on it. Navigation annotation allows to mark a token that should be selected after the code action is applied. |
WithRenameAnnotation(SyntaxToken) | Adds "rename" annotation to the specified token, creating a new token of the same type with the "rename" annotation on it. "Rename" annotation is specified by RenameAnnotation.Kind. |
WithSimplifierAnnotation(SyntaxToken) | Adds Simplifier.Annotation to the specified token, creating a new token of the same type with the Simplifier.Annotation on it. "Rename" annotation is specified by RenameAnnotation.Kind. |
WithSimplifierAnnotation<TNode>(TNode) | Creates a new node with the Simplifier.Annotation attached. |