GeneratorAttributeSyntaxContext Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public readonly struct GeneratorAttributeSyntaxContext
type GeneratorAttributeSyntaxContext = struct
Public Structure GeneratorAttributeSyntaxContext
- Inheritance
-
GeneratorAttributeSyntaxContext
Properties
Attributes |
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. |
SemanticModel |
Semantic model for the file that TargetNode is contained within. |
TargetNode |
The syntax node the attribute is attached to. For example, with |
TargetSymbol |
The symbol that the attribute is attached to. For example, with |