Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 424 Bytes

File metadata and controls

13 lines (10 loc) · 424 Bytes

Recur sample

Illustrates how to run a set of recurring background steps within your workflow, until a certain condition is met

builder
    .StartWith(context => Console.WriteLine("Hello"))
    .Recur(data => TimeSpan.FromSeconds(5), data => data.Counter > 5).Do(recur => recur
        .StartWith(context => Console.WriteLine("Doing recurring task"))
    )
    .Then(context => Console.WriteLine("Carry on"));