Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Domain/EventoAgendadoState.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/EventoAgendadoState.cs Sun Jun 05 11:57:34 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Domain/EventoAgendadoState.cs Sun Jun 05 13:06:23 2011 -0300 @@ -4,24 +4,24 @@ { public class EventoAgendadoState : EventoState { - private readonly Evento _evento; + public const string Descripcion = "Agendado"; - public EventoAgendadoState(Evento evento) - { - _evento = evento; - _evento.AddTrack(new Track(_evento, Accion.Agendar)); - } - - public override void Promover(Accion accion) + public override void Promover(Evento evento, Accion accion) { switch (accion) { case Accion.Confirmar: - _evento.Estado = new EventoConfirmadoState(_evento); + evento.SetEstado(new EventoConfirmadoState()); + evento.AddTrack(new Track(evento, Accion.Confirmar)); break; default: throw new AccionNoSoportadaException(this.GetType(), accion); } } + + public override string GetDescripcion() + { + return Descripcion; + } } } \ No newline at end of file