Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Domain/EventoPublicadoState.cs @ 101:9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
author | jorge.rowies |
---|---|
date | Sun, 05 Jun 2011 11:10:32 -0300 |
parents | |
children | 23325dddddcc |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Agendas/trunk/src/Agendas.Domain/EventoPublicadoState.cs Sun Jun 05 11:10:32 2011 -0300 @@ -0,0 +1,20 @@ +using AltNetHispano.Agendas.Domain.Exceptions; + +namespace AltNetHispano.Agendas.Domain +{ + public class EventoPublicadoState : EventoState + { + private readonly Evento _evento; + + public EventoPublicadoState(Evento evento) + { + _evento = evento; + _evento.AddTrack(new Track(_evento, Accion.Publicar)); + } + + public override void Promover(Accion accion) + { + throw new AccionNoSoportadaException(this.GetType(), accion); + } + } +} \ No newline at end of file