Metalama 1.0 / / Metalama Documentation / Advanced API / Metalama.​Framework.​Engine.​Formatting / Formatting­Annotations / With­Source­Code­Annotation

Method WithSourceCodeAnnotation

WithSourceCodeAnnotation<T>(T)

Annotates a syntax node with an annotation meaning that the syntax node and all its children are user code. The annotation is typically obtained from GeneratedCodeAnnotation, but it can also be created from CreateGeneratedCodeAnnotation(String).

Declaration
public static T WithSourceCodeAnnotation<T>(this T node)
where T : SyntaxNode
Parameters
Type Name Description
T node

The input node.

Returns
Type Description
T

The annotated node.

Type Parameters
Name Description
T