SyntaxValueProvider Struct

Definition

Allows a user to create Syntax based input nodes for incremental generation

public readonly struct SyntaxValueProvider
type SyntaxValueProvider = struct
Public Structure SyntaxValueProvider
Inheritance
SyntaxValueProvider

Methods

CreateSyntaxProvider<T>(Func<SyntaxNode,CancellationToken,Boolean>, Func<GeneratorSyntaxContext,CancellationToken,T>)

Creates an IncrementalValueProvider<TValue> that can provide a transform over SyntaxNodes

ForAttributeWithMetadataName<T>(String, Func<SyntaxNode,CancellationToken,Boolean>, Func<GeneratorAttributeSyntaxContext,CancellationToken,T>)

Creates an IncrementalValuesProvider<TValues> that can provide a transform over all SyntaxNodes if that node has an attribute on it that binds to a INamedTypeSymbol with the same fully-qualified metadata as the provided fullyQualifiedMetadataName. fullyQualifiedMetadataName should be the fully-qualified, metadata name of the attribute, including the Attribute suffix. For example "System.CLSCompliantAttribute" for CLSCompliantAttribute.

Applies to