Skip to content

Instantly share code, notes, and snippets.

Created September 22, 2019 23:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
private BehaviorResult<CrewContext> ProcessCrewWorkOnItem(CrewContext context, WorkItem ticket)
var result = GetWorkOnItemResult(context, ticket);
completed =>
ticket.Status = WorkItemStatus.ReadyForReview;
AddMessage(context, $"{context.CrewMember.FullName} finishes work on {ticket.Title}");
progress =>
AddMessage(context, $"{context.CrewMember.FullName} made steady progress on {ticket.Title}");
setback =>
if (setback.Severity > Priority.Normal)
ticket.ProgressMade -= 3;
AddMessage(context, $"{context.CrewMember.FullName} encountered a major setback on {ticket.Title}");
ticket.ProgressMade -= 1;
AddMessage(context, $"{context.CrewMember.FullName} encountered a setback on {ticket.Title}");
return MatchedResult(context);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment