public Task Handle(CloseElection message, IMessageHandlerContext context)
    {
        var reportVotes = new ReportVotes
        {
            Candidate     = Data.Candidate,
            NumberOfVotes = Data.Count
        };

        MarkAsComplete();
        return(context.SendLocal(reportVotes));
    }
Esempio n. 2
0
    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();
    }