IncrementalValuesProvider<TValues> 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.
Represents a provider of multiple values that can be transformed to construct an execution pipeline
public readonly struct IncrementalValuesProvider<TValues>
type IncrementalValuesProvider<'Values> = struct
Public Structure IncrementalValuesProvider(Of TValues)
Type Parameters
- TValues
The type of value that this source provides access to
- Inheritance
-
IncrementalValuesProvider<TValues>
Remarks
This is an opaque type that cannot be used directly. Instead an IIncrementalGenerator will receive a set of value providers when constructing its execution pipeline. A set of extension methods are then used to create transforms over the data that creates the actual pipeline.
Extension Methods
| Name | Description |
|---|---|
| Collect<TSource>(IncrementalValuesProvider<TSource>) |
Collects all values from an IncrementalValuesProvider<TValues> into a single IncrementalValueProvider<TValue> containing an ImmutableArray<T>. This is useful when you need to aggregate multiple values into a single collection to process them together. |
| Combine<TLeft,TRight>(IncrementalValuesProvider<TLeft>, IncrementalValueProvider<TRight>) |
Combines an IncrementalValuesProvider<TValues> with an IncrementalValueProvider<TValue> to create a new IncrementalValuesProvider<TValues> of tuples. Each value from the left provider is paired with the single value from the right provider. |
| Select<TSource,TResult>(IncrementalValuesProvider<TSource>, Func<TSource,CancellationToken,TResult>) |
Transforms an IncrementalValuesProvider<TValues> into a new IncrementalValuesProvider<TValues> by applying a transform function to each value. This is a 1-to-1 transformation where each input value produces exactly one output value. |
| SelectMany<TSource,TResult>(IncrementalValuesProvider<TSource>, Func<TSource,CancellationToken,IEnumerable<TResult>>) |
Transforms an IncrementalValuesProvider<TValues> into a new IncrementalValuesProvider<TValues> by applying a transform function that returns zero or more results for each input value. This is a many-to-many transformation where each input value can produce zero, one, or multiple output values. |
| SelectMany<TSource,TResult>(IncrementalValuesProvider<TSource>, Func<TSource,CancellationToken,ImmutableArray<TResult>>) |
Transforms an IncrementalValuesProvider<TValues> into a new IncrementalValuesProvider<TValues> by applying a transform function that returns zero or more results for each input value. This is a many-to-many transformation where each input value can produce zero, one, or multiple output values. |
| Where<TSource>(IncrementalValuesProvider<TSource>, Func<TSource,Boolean>) |
Filters values from an IncrementalValuesProvider<TValues> based on a predicate, producing a new IncrementalValuesProvider<TValues> containing only values that satisfy the predicate. |
| WithComparer<TSource>(IncrementalValuesProvider<TSource>, IEqualityComparer<TSource>) |
Specifies a custom IEqualityComparer<T> to use when comparing values from this provider for caching purposes. By default, the generator infrastructure uses Default to determine if values have changed. Use this method when you need custom equality logic, such as for complex objects or when you want to control when transformations are re-executed. |
| WithTrackingName<TSource>(IncrementalValuesProvider<TSource>, String) |
Assigns a name to this provider step for tracking and debugging purposes. This name can be used in testing and diagnostic scenarios to understand the execution pipeline. |