public Task Handle(CloseElection message, IMessageHandlerContext context) { var reportVotes = new ReportVotes { Candidate = Data.Candidate, NumberOfVotes = Data.Count }; MarkAsComplete(); return(context.SendLocal(reportVotes)); }
public async Task Handle(CloseElection message, IMessageHandlerContext context) { var reportVotes = new ReportVotes { Candidate = Data.Candidate, NumberOfVotes = Data.Count }; await context.SendLocal(reportVotes) .ConfigureAwait(false); MarkAsComplete(); }