private void UpdateState(IEvt evt) { if (evt is MsgSent) { var msg = (MsgSent)evt; Add(msg.I); Deliver(_destination.Path, deliveryId => new Msg(deliveryId, msg.I)); } else if (evt is MsgConfirmed) { var confirmation = (MsgConfirmed)evt; ConfirmDelivery(confirmation.DeliveryId); } }
private void UpdateState(IEvt evt) { evt.Match() .With <AcceptedReq>(a => { _log.Debug("Deliver(destination, deliveryId => Action(deliveryId, {0})), recovering: {1}", a.Payload, IsRecovering); Deliver(ActorPath.Parse(a.DestinationPath), deliveryId => new Action(deliveryId, a.Payload)); }) .With <ReqDone>(r => { _log.Debug("ConfirmDelivery({0}), recovering: {1}", r.Id, IsRecovering); ConfirmDelivery(r.Id); }); }