Skip to content

Instantly share code, notes, and snippets.

@tomliversidge
Created June 24, 2017 13:48
Show Gist options
  • Save tomliversidge/b03558d9d22f328238f30e9bcefdbc73 to your computer and use it in GitHub Desktop.
Save tomliversidge/b03558d9d22f328238f30e9bcefdbc73 to your computer and use it in GitHub Desktop.
Saga 3.8
public async Task ReceiveAsync(IContext context)
{
switch (context.Message)
{
//...
case Stopping msg:
_stopping = true;
break;
case Restarting msg:
_restarting = true;
break;
case Terminated _ when _restarting || _stopping:
return;
//...
}
await _behavior.ReceiveAsync(context);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment