SyntaxValueProvider.CreateSyntaxProvider<T> Method
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.
Creates an IncrementalValueProvider<TValue> that can provide a transform over SyntaxNodes
public Microsoft.CodeAnalysis.IncrementalValuesProvider<T> CreateSyntaxProvider<T>(Func<Microsoft.CodeAnalysis.SyntaxNode,System.Threading.CancellationToken,bool> predicate, Func<Microsoft.CodeAnalysis.GeneratorSyntaxContext,System.Threading.CancellationToken,T> transform);
member this.CreateSyntaxProvider : Func<Microsoft.CodeAnalysis.SyntaxNode, System.Threading.CancellationToken, bool> * Func<Microsoft.CodeAnalysis.GeneratorSyntaxContext, System.Threading.CancellationToken, 'T> -> Microsoft.CodeAnalysis.IncrementalValuesProvider<'T>
Public Function CreateSyntaxProvider(Of T) (predicate As Func(Of SyntaxNode, CancellationToken, Boolean), transform As Func(Of GeneratorSyntaxContext, CancellationToken, T)) As IncrementalValuesProvider(Of T)
- T
The type of the value the syntax node is transformed into
- predicate
- Func<SyntaxNode,CancellationToken,Boolean>
A function that determines if the given SyntaxNode should be transformed
- transform
- Func<GeneratorSyntaxContext,CancellationToken,T>
A function that performs the transform, when predicate
returns true
for a given node
An IncrementalValueProvider<TValue> that provides the results of the transformation
Produkt | Versioner |
---|---|
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 |
Feedback om .NET
.NET är ett öppen källkod projekt. Välj en länk för att ge feedback: