Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Domain/EventoNullState.cs @ 103:23325dddddcc
Persistencia del estado de los eventos
author | jorge.rowies |
---|---|
date | Sun, 05 Jun 2011 13:06:23 -0300 |
parents | 9bfdd5bf3ad2 |
children | c5034884c7d7 |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Domain/EventoNullState.cs Sun Jun 05 11:57:34 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Domain/EventoNullState.cs Sun Jun 05 13:06:23 2011 -0300 @@ -4,26 +4,26 @@ { public class EventoNullState : EventoState { - private readonly Evento _evento; - - public EventoNullState(Evento evento) - { - _evento = evento; - } - - public override void Promover(Accion accion) + public override void Promover(Evento evento, Accion accion) { switch (accion) { case Accion.Proponer: - _evento.Estado = new EventoPropuestoState(_evento); + evento.SetEstado(new EventoPropuestoState()); + evento.AddTrack(new Track(evento, Accion.Proponer)); break; case Accion.Agendar: - _evento.Estado = new EventoAgendadoState(_evento); + evento.SetEstado(new EventoAgendadoState()); + evento.AddTrack(new Track(evento, Accion.Agendar)); break; default: throw new AccionNoSoportadaException(this.GetType(), accion); } } + + public override string GetDescripcion() + { + return "NullState"; + } } } \ No newline at end of file