Open mattridgway opened 9 years ago
This should be pretty easy to accomplish. Basically, by default we'd expose the CancellationToken, but the helpers can manage the token in order to provide the above extensions.
+1
This needs to be moved to smudge202/compose-azurecloudservice
To make the code more implicit we should change the service host extension methods so that composition looks like the following:
//Thread falls through after it has run, service would stop app.OnStart(projector => projector.Receive).ThenStop();
app.OnStop(projector => projector.Dispose);
//Thread is held after it has run, like listening for new event from hub app.OnStart(projector => projector.Receive).ThenBlock();
app.OnStop(projector => projector.Dispose);
//everytime it finishes it loops around and starts again app.OnStart(projector => projector.Receive).ThenLoop();
app.OnStop(projector => projector.Dispose);