diff Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs @ 128:1e47bf408073

Asignacion de los publicadores configurados en web.config al factory de agenda (mediante CompositePublicador)
author jorge.rowies
date Mon, 04 Jul 2011 20:00:51 -0300
parents a456eb519e23
children
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs	Sat Jul 02 21:50:05 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs	Mon Jul 04 20:00:51 2011 -0300
@@ -1,4 +1,5 @@
-using Agendas.NHibernate;
+using System.Collections.Generic;
+using Agendas.NHibernate;
 using AltNetHispano.Agendas.Domain;
 using AltNetHispano.Agendas.Domain.Repositories;
 using AltNetHispano.Agendas.Domain.Services;
@@ -11,6 +12,8 @@
 {
 	public static class AgendaFactory
 	{
+		public static IPublicador Publicador { get; set; }
+
 		private static Agenda _agenda;
 
 		public static Agenda GetAgenda()
@@ -18,7 +21,7 @@
 			ISessionFactory sessionFactory = NhHelper.GetSessionFactory();
 			return _agenda ??
 			       (_agenda =
-			        new Agenda(new TwitterPublicador(), new EventoRepository(sessionFactory),
+			        new Agenda(Publicador, new EventoRepository(sessionFactory),
 			                   new PersonaRepository(sessionFactory)));
 		}