comparison Agendas/trunk/src/Agendas.Domain/Track.cs @ 111:90ce239cfa6d

Tests sobre el publicador de twitter, cada track se pulica solo una vez
author Nelo@Kenia.neluz.int
date Wed, 08 Jun 2011 08:40:04 -0300
parents db4b1e2cae49
children 6f1041301797
comparison
equal deleted inserted replaced
110:a456eb519e23 111:90ce239cfa6d
1 namespace AltNetHispano.Agendas.Domain 1 using System;
2 using System.Collections.Generic;
3
4 namespace AltNetHispano.Agendas.Domain
2 { 5 {
3 public class Track : Identificable 6 public class Track : Identificable
4 { 7 {
8 private readonly IList<TrackLog> _logs;
9
5 protected Track() 10 protected Track()
6 { 11 {
7 //ctor para NHibernate 12 //ctor para NHibernate
13 _logs = new List<TrackLog>();
8 } 14 }
9 15
10 public Track(Evento evento, Accion accion) 16 public Track(Evento evento, Accion accion)
17 : this()
11 { 18 {
12 Usuario = IdentityContext.GetUsuario(); 19 Usuario = IdentityContext.GetUsuario();
13 Evento = evento; 20 Evento = evento;
14 Accion = accion; 21 Accion = accion;
15 } 22 }
16 23
17 public virtual Evento Evento { get; private set; } 24 public virtual Evento Evento { get; private set; }
18 public virtual Accion Accion { get; private set; } 25 public virtual Accion Accion { get; private set; }
19 public virtual Persona Usuario { get; private set; } 26 public virtual Persona Usuario { get; private set; }
27
28 public virtual IEnumerable<TrackLog> Logs
29 {
30 get { return _logs; }
31 }
32
33 public virtual void LogAdd(TrackLog trackLog)
34 {
35 trackLog.Track = this;
36 _logs.Add(trackLog);
37 }
20 } 38 }
21 39
22 public enum Accion 40 public enum Accion
23 { 41 {
24 Proponer = 1, 42 Proponer = 1,