Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Domain/EventoNullState.cs @ 126:6012f2becf97
Se agrega instalación de nuget package para el calendario de google.
author | alabra |
---|---|
date | Tue, 28 Jun 2011 23:35:22 -0400 |
parents | 53bcd338542b |
children | 3639803112c6 |
line wrap: on
line source
using System; using AltNetHispano.Agendas.Domain.Exceptions; namespace AltNetHispano.Agendas.Domain { public class EventoNullState : EventoState { private EventoNullState() { } private static readonly EventoState _instance = new EventoNullState(); public static EventoState GetInstance() { return _instance; } private const string Descripcion = "NullState"; public override void Promover(Evento evento, Accion accion) { switch (accion) { case Accion.Proponer: evento.SetEstado(EventoPropuestoState.GetInstance()); evento.AddTrack(new Track(evento, Accion.Proponer)); break; case Accion.Agendar: evento.SetEstado(EventoAgendadoState.GetInstance()); evento.AddTrack(new Track(evento, Accion.Agendar)); break; default: throw new AccionNoSoportadaException(this.GetType(), accion); } } public override string GetDescripcion() { return Descripcion; } public override bool PuedePromover(Accion accion) { return accion == Accion.Proponer || accion == Accion.Agendar; } } }