MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeDeclaration­Enhancements<T>Get­Annotations
Open sandboxFocus

DeclarationEnhancements<T>.GetAnnotations Method

GetAnnotations<TAnnotation>()

Gets the list of annotations of a given type on the current declaration.

Declaration
public IEnumerable<TAnnotation> GetAnnotations<TAnnotation>()
where TAnnotation : class, IAnnotation<T>
Returns
Type Description
System.Collections.Generic.IEnumerable<TAnnotation>

The list of annotations of this type on the current declaration.

Type Parameters
Name Description
TAnnotation

The type of annotations.