Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Domain/EventoPropuestoState.cs @ 109:6bd9be78caa0
Merge
author | Nelo@Kenia.neluz.int |
---|---|
date | Tue, 07 Jun 2011 23:21:07 -0300 |
parents | c5034884c7d7 |
children | 53bcd338542b |
comparison
equal
deleted
inserted
replaced
108:786a90e26c9b | 109:6bd9be78caa0 |
---|---|
1 using AltNetHispano.Agendas.Domain.Exceptions; | |
2 | |
3 namespace AltNetHispano.Agendas.Domain | |
4 { | |
5 public class EventoPropuestoState : EventoState | |
6 { | |
7 private EventoPropuestoState() | |
8 { | |
9 } | |
10 | |
11 private static readonly EventoState _instance = new EventoPropuestoState(); | |
12 public static EventoState GetInstance() | |
13 { | |
14 return _instance; | |
15 } | |
16 | |
17 private const string Descripcion = "Propuesto"; | |
18 | |
19 public override void Promover(Evento evento, Accion accion) | |
20 { | |
21 switch (accion) | |
22 { | |
23 case Accion.Agendar: | |
24 evento.SetEstado(EventoAgendadoState.GetInstance()); | |
25 evento.AddTrack(new Track(evento, Accion.Agendar)); | |
26 break; | |
27 default: | |
28 throw new AccionNoSoportadaException(this.GetType(), accion); | |
29 } | |
30 } | |
31 | |
32 public override string GetDescripcion() | |
33 { | |
34 return Descripcion; | |
35 } | |
36 } | |
37 } |