annotate Agendas/trunk/src/Agendas.Domain/EventoPublicadoState.cs @ 101:9bfdd5bf3ad2

Manejo de estados de los Eventos mediante state pattern (primer version)
author jorge.rowies
date Sun, 05 Jun 2011 11:10:32 -0300
parents
children 23325dddddcc
rev   line source
101
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
1 using AltNetHispano.Agendas.Domain.Exceptions;
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
2
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
3 namespace AltNetHispano.Agendas.Domain
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
4 {
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
5 public class EventoPublicadoState : EventoState
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
6 {
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
7 private readonly Evento _evento;
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
8
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
9 public EventoPublicadoState(Evento evento)
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
10 {
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
11 _evento = evento;
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
12 _evento.AddTrack(new Track(_evento, Accion.Publicar));
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
13 }
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
14
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
15 public override void Promover(Accion accion)
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
16 {
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
17 throw new AccionNoSoportadaException(this.GetType(), accion);
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
18 }
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
19 }
9bfdd5bf3ad2 Manejo de estados de los Eventos mediante state pattern (primer version)
jorge.rowies
parents:
diff changeset
20 }