public async Task Handle(AddOneCommand command) { //_logger.Info($"processing [{command.MessageId}]"); await Task.Delay(TimeSpan.FromMilliseconds(_delay)); Store = Store + 1; //_logger.Info($"async await actor finished [{command.MessageId}]"); }
public bool Handle(AddOneCommand command) { // _logger.Info($"processing [{command.MessageId}]"); Task.Delay(TimeSpan.FromMilliseconds(_delay)) .ContinueWith(continuation => { var cmd = command; return(new PipeAddOneCommand(cmd.MessageId)); }, TaskContinuationOptions.ExecuteSynchronously) .PipeTo(Self); return(true); }