MetalamaAPI documentationAdvanced APIMetalama.​Framework.​Engine.​FormattingFormatting­AnnotationsWith­Generated­Code­Annotation
Open sandboxFocus

FormattingAnnotations.WithGeneratedCodeAnnotation Method

WithGeneratedCodeAnnotation(SyntaxToken, SyntaxAnnotation)

Declaration
public static SyntaxToken WithGeneratedCodeAnnotation(this SyntaxToken node, SyntaxAnnotation annotation)
Parameters
Type Name Description
Microsoft.CodeAnalysis.SyntaxToken node
Microsoft.CodeAnalysis.SyntaxAnnotation annotation
Returns
Type Description
Microsoft.CodeAnalysis.SyntaxToken

WithGeneratedCodeAnnotation<T>(T, SyntaxAnnotation)

Declaration
public static T WithGeneratedCodeAnnotation<T>(this T node, SyntaxAnnotation annotation)
where T : SyntaxNode
Parameters
Type Name Description
T node
Microsoft.CodeAnalysis.SyntaxAnnotation annotation
Returns
Type Description
T
Type Parameters
Name Description
T

WithGeneratedCodeAnnotation(in SyntaxTrivia, SyntaxAnnotation)

Declaration
public static SyntaxTrivia WithGeneratedCodeAnnotation(this in SyntaxTrivia trivia, SyntaxAnnotation annotation)
Parameters
Type Name Description
Microsoft.CodeAnalysis.SyntaxTrivia trivia
Microsoft.CodeAnalysis.SyntaxAnnotation annotation
Returns
Type Description
Microsoft.CodeAnalysis.SyntaxTrivia