Share via


GeneratorAttributeSyntaxContext.Attributes Property

Definition

AttributeDatas for any matching attributes on TargetSymbol. Always non-empty. All these attributes will have an AttributeClass whose fully qualified name metadata name matches the name requested in ForAttributeWithMetadataName<T>(String, Func<SyntaxNode,CancellationToken,Boolean>, Func<GeneratorAttributeSyntaxContext,CancellationToken,T>).

To get the entire list of attributes, use GetAttributes() on TargetSymbol.

public System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.AttributeData> Attributes { get; }
member this.Attributes : System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.AttributeData>
Public ReadOnly Property Attributes As ImmutableArray(Of AttributeData)

Property Value

Applies to