Esempio n. 1
0
        public override Task <Unit> Send(MessageEnvelope request, ServerCallContext context)
        {
            var(message, sender) = Deserialize(request);

            _self.Post(message, sender);

            return(Task.FromResult(Unit));
        }
Esempio n. 2
0
        public Task HandleFailure(IActorProcess self, Failure failure)
        {
            self.Post(new Restart(self.Configuration.Id.Value, failure.Reason), self);

            foreach (var child in self.Children)
            {
                child.Post(new Restart(child.Configuration.Id.Value, failure.Reason), self);
            }

            return(Task.CompletedTask);
        }
 public void Post(IMessage msg)
 {
     _target.Post(msg, _sender);
 }