Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Domain/EventoAgendadoState.cs @ 123:f8568f01da4d
Mejorando los mensajes en Twitter
author | nelopauselli |
---|---|
date | Tue, 28 Jun 2011 20:53:30 -0300 |
parents | 53bcd338542b |
children | 6f1041301797 |
line wrap: on
line source
using System; using AltNetHispano.Agendas.Domain.Exceptions; namespace AltNetHispano.Agendas.Domain { public class EventoAgendadoState : EventoState { private EventoAgendadoState() { } private static readonly EventoState _instance = new EventoAgendadoState(); public static EventoState GetInstance() { return _instance; } private const string Descripcion = "Agendado"; public override void Promover(Evento evento, Accion accion) { switch (accion) { case Accion.Confirmar: evento.SetEstado(EventoConfirmadoState.GetInstance()); evento.AddTrack(new Track(evento, Accion.Confirmar)); break; default: throw new AccionNoSoportadaException(this.GetType(), accion); } } public override string GetDescripcion() { return Descripcion; } public override bool PuedePromover(Accion accion) { return accion == Accion.Confirmar; } } }