mvSapphire / PowerPipe

A library for .NET that uses a fluent interface to construct advanced workflows with ease.
MIT License
193 stars 10 forks source link

Parallel step error #27

Closed Kentucky1988 closed 1 year ago

Kentucky1988 commented 1 year ago

If in parallel step added only .AddIf() that accepted false, we catch error on row:

Error message:

   System.NullReferenceException: Object reference not set to an instance of an object.
   at PowerPipe.Builder.Steps.AddIfStep1.ExecuteInternalAsync(TContext context, CancellationToken cancellationToken)
   at PowerPipe.Builder.Steps.InternalStep1.ExecuteAsync(TContext context, CancellationToken cancellationToken)
    End of inner exception stack trace
   at PowerPipe.Builder.Steps.InternalStep1.ExecuteAsync(TContext context, CancellationToken cancellationToken)
   at PowerPipe.Builder.Steps.InternalStep1.ExecuteAsync(TContext context, CancellationToken cancellationToken)
   at PowerPipe.Builder.Steps.ParallelStep2.<>c__DisplayClass3_0.<<ExecuteInternalAsync>b__0>d.MoveNext()

Code example:


.Parallel(b => b
    .AddIf<TestParallelStep>(_ => false)
    .AddIf<TestParallelStep>(_ => false)
    .AddIf<TestParallelStep>(_ => false))