Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Domain/EventoConfirmadoState.cs @ 116:53bcd338542b
acciones de confirmar y publicar desde la UI
author | Nelo@Kenia.neluz.int |
---|---|
date | Sun, 19 Jun 2011 13:00:02 -0300 |
parents | c5034884c7d7 |
children | 3639803112c6 |
line wrap: on
line source
using System; using AltNetHispano.Agendas.Domain.Exceptions; namespace AltNetHispano.Agendas.Domain { public class EventoConfirmadoState : EventoState { private EventoConfirmadoState() { } private static readonly EventoState _instance = new EventoConfirmadoState(); public static EventoState GetInstance() { return _instance; } private const string Descripcion = "Confirmado"; public override void Promover(Evento evento, Accion accion) { switch (accion) { case Accion.Publicar: evento.SetEstado(EventoPublicadoState.GetInstance()); evento.AddTrack(new Track(evento, Accion.Publicar)); break; default: throw new AccionNoSoportadaException(this.GetType(), accion); } } public override string GetDescripcion() { return Descripcion; } public override bool PuedePromover(Accion accion) { return accion == Accion.Publicar; } } }