WithFormattingAnnotationsFrom<T>(T, SyntaxNode)
Copies the formatting annotations (source or generated code) from one node to another.
Declaration
public static T WithFormattingAnnotationsFrom<T>(this T node, SyntaxNode source) where T : SyntaxNodeParameters
| Type | Name | Description |
|---|---|---|
| T | node | The node to annotate. |
| SyntaxNode | source | The node to copy annotations from. |
Returns
| Type | Description |
|---|---|
| T | The target node with the same formatting annotations as the source node. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of syntax node. |