İngilizce dilinde oku

Aracılığıyla paylaş


SyntaxValueProvider Struct

Definition

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

C#
public readonly struct 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

Ürün Sürümler
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 4.0.1, 4.1.0, 4.12.2, 4.13.0