Exemplo n.º 1
0
 public static IncrementalValuesProvider <(TLeft Left, TRight Right)> Combine <TLeft, TRight>(this IncrementalValuesProvider <TLeft> provider1, IncrementalValueProvider <TRight> provider2) => new IncrementalValuesProvider <(TLeft, TRight)>(new CombineNode <TLeft, TRight>(provider1.Node, provider2.Node));
Exemplo n.º 2
0
 public static IncrementalValuesProvider <TResult> SelectMany <TSource, TResult>(this IncrementalValueProvider <TSource> source, Func <TSource, CancellationToken, IEnumerable <TResult> > selector) => new IncrementalValuesProvider <TResult>(new TransformNode <TSource, TResult>(source.Node, selector.WrapUserFunctionAsImmutableArray()));
Exemplo n.º 3
0
 public void RegisterImplementationSourceOutput <TSource>(IncrementalValueProvider <TSource> source, Action <SourceProductionContext, TSource> action) => RegisterSourceOutput(source.Node, action, IncrementalGeneratorOutputKind.Implementation, _sourceExtension);
Exemplo n.º 4
0
 // 1 => 1 transform
 public static IncrementalValueProvider <TResult> Select <TSource, TResult>(this IncrementalValueProvider <TSource> source, Func <TSource, CancellationToken, TResult> selector) => new IncrementalValueProvider <TResult>(new TransformNode <TSource, TResult>(source.Node, selector.WrapUserFunction()));
Exemplo n.º 5
0
 public void RegisterSourceOutput <TSource>(IncrementalValueProvider <TSource> source, Action <SourceProductionContext, TSource> action) => source.Node.RegisterOutput(new SourceOutputNode <TSource>(source.Node, action.WrapUserAction()));