Created
June 24, 2017 13:48
-
-
Save tomliversidge/b03558d9d22f328238f30e9bcefdbc73 to your computer and use it in GitHub Desktop.
Saga 3.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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