comparison Agendas/trunk/src/Agendas.Domain/EventoConfirmadoState.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 EventoConfirmadoState : EventoState
6 {
7 private EventoConfirmadoState()
8 {
9 }
10
11 private static readonly EventoState _instance = new EventoConfirmadoState();
12 public static EventoState GetInstance()
13 {
14 return _instance;
15 }
16
17 private const string Descripcion = "Confirmado";
18
19 public override void Promover(Evento evento, Accion accion)
20 {
21 switch (accion)
22 {
23 case Accion.Publicar:
24 evento.SetEstado(EventoPublicadoState.GetInstance());
25 evento.AddTrack(new Track(evento, Accion.Publicar));
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 }