Mercurial > altnet-hispano
annotate Agendas/trunk/src/Agendas.Domain/EventoPublicadoState.cs @ 119:8fa58a79656a
Historico
author | Nelo@Kenia.neluz.int |
---|---|
date | Wed, 22 Jun 2011 09:49:07 -0300 |
parents | 53bcd338542b |
children | 3639803112c6 |
rev | line source |
---|---|
116
53bcd338542b
acciones de confirmar y publicar desde la UI
Nelo@Kenia.neluz.int
parents:
104
diff
changeset
|
1 using System; |
53bcd338542b
acciones de confirmar y publicar desde la UI
Nelo@Kenia.neluz.int
parents:
104
diff
changeset
|
2 using AltNetHispano.Agendas.Domain.Exceptions; |
101
9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff
changeset
|
3 |
9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff
changeset
|
4 namespace AltNetHispano.Agendas.Domain |
9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff
changeset
|
5 { |
9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff
changeset
|
6 public class EventoPublicadoState : EventoState |
9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff
changeset
|
7 { |
104 | 8 private EventoPublicadoState() |
9 { | |
10 } | |
11 | |
12 private static readonly EventoState _instance = new EventoPublicadoState(); | |
13 public static EventoState GetInstance() | |
14 { | |
15 return _instance; | |
16 } | |
17 | |
18 private const string Descripcion = "Publicado"; | |
101
9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff
changeset
|
19 |
103 | 20 public override void Promover(Evento evento, Accion accion) |
101
9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff
changeset
|
21 { |
9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff
changeset
|
22 throw new AccionNoSoportadaException(this.GetType(), accion); |
9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff
changeset
|
23 } |
103 | 24 |
25 public override string GetDescripcion() | |
26 { | |
27 return Descripcion; | |
28 } | |
116
53bcd338542b
acciones de confirmar y publicar desde la UI
Nelo@Kenia.neluz.int
parents:
104
diff
changeset
|
29 |
53bcd338542b
acciones de confirmar y publicar desde la UI
Nelo@Kenia.neluz.int
parents:
104
diff
changeset
|
30 public override bool PuedePromover(Accion accion) |
53bcd338542b
acciones de confirmar y publicar desde la UI
Nelo@Kenia.neluz.int
parents:
104
diff
changeset
|
31 { |
53bcd338542b
acciones de confirmar y publicar desde la UI
Nelo@Kenia.neluz.int
parents:
104
diff
changeset
|
32 return false; |
53bcd338542b
acciones de confirmar y publicar desde la UI
Nelo@Kenia.neluz.int
parents:
104
diff
changeset
|
33 } |
101
9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff
changeset
|
34 } |
9bfdd5bf3ad2
Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff
changeset
|
35 } |