Skip to content

Instantly share code, notes, and snippets.

@tomliversidge
Created June 24, 2017 14:02
Show Gist options
  • Save tomliversidge/98e8690ff63f5e3813552e0d643b3121 to your computer and use it in GitHub Desktop.
Save tomliversidge/98e8690ff63f5e3813552e0d643b3121 to your computer and use it in GitHub Desktop.
Saga 5.3
public Task ReceiveAsync(IContext context)
{
switch (context.Message)
{
case SuccessResult msg:
_successResults++;
CheckForCompletion(msg.Pid);
break;
case UnknownResult msg:
_unknownResults++;
CheckForCompletion(msg.Pid);
break;
case FailedAndInconsistent msg:
_failedAndInconsistentResults++;
CheckForCompletion(msg.Pid);
break;
case FailedButConsistentResult msg:
_failedButConsistentResults++;
CheckForCompletion(msg.Pid);
break;
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment