Mercurial > altnet-hispano
diff 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 |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Domain/Track.cs Wed Jun 08 07:33:14 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Domain/Track.cs Wed Jun 08 08:40:04 2011 -0300 @@ -1,13 +1,20 @@ -namespace AltNetHispano.Agendas.Domain +using System; +using System.Collections.Generic; + +namespace AltNetHispano.Agendas.Domain { public class Track : Identificable { + private readonly IList<TrackLog> _logs; + protected Track() { //ctor para NHibernate + _logs = new List<TrackLog>(); } public Track(Evento evento, Accion accion) + : this() { Usuario = IdentityContext.GetUsuario(); Evento = evento; @@ -17,6 +24,17 @@ public virtual Evento Evento { get; private set; } public virtual Accion Accion { get; private set; } public virtual Persona Usuario { get; private set; } + + public virtual IEnumerable<TrackLog> Logs + { + get { return _logs; } + } + + public virtual void LogAdd(TrackLog trackLog) + { + trackLog.Track = this; + _logs.Add(trackLog); + } } public enum Accion