public CuentaAhorroActor() { PersistenceId = Context.Parent.Path.Name + "-" + Self.Path.Name; Recover <Deposito>(deposito => AgregarDeposito(deposito)); Recover <SnapshotOffer>(offer => { var deposito = offer.Snapshot as Deposito; if (deposito != null) { Depositos.Add(deposito); } }); Command <SaveSnapshotSuccess>(exito => DeleteMessages(exito.Metadata.SequenceNr, false)); Command <ComandoRealizarDeposito>(cmd => Persist(cmd.Deposito, handler => Handle(cmd.Deposito))); Command <RequestConsultarDeposito>(req => Handle(req)); }
public void RegisterDeposito(Guid depositoID) { Depositos.Add(depositoID); }