Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Domain/EventoConfirmadoState.cs @ 169:5c94b052d838
Ticket 153: UI de Publicar. Faltaba la Duración del evento en la capa de negocios.
author | juanjose.montesdeocaarbos |
---|---|
date | Sat, 06 Aug 2011 12:41:46 -0300 |
parents | 3639803112c6 |
children |
line wrap: on
line source
using System; using AltNetHispano.Agendas.Domain.Exceptions; namespace AltNetHispano.Agendas.Domain { public class EventoConfirmadoState : EventoState { protected EventoConfirmadoState() { } private static readonly EventoState _instance = new EventoConfirmadoState(); public static EventoState GetInstance() { return _instance; } public override void Promover(Evento evento, Accion accion) { switch (accion) { case Accion.Publicar: evento.Estado = EventoPublicadoState.GetInstance(); evento.AddTrack(new Track(evento, Accion.Publicar)); break; default: throw new AccionNoSoportadaException(this.GetType(), accion); } } public override string Descripcion { get { return "Confirmado"; } } public override bool PuedePromover(Accion accion) { return accion == Accion.Publicar; } } }