diff Agendas/trunk/src/Agendas.Blog/Impl/BlogPublicador.cs @ 65:ebce59b45b50

Agregado de version inicial del publicador para el blog
author ROWIES@ardejorxp.inworx.corp
date Tue, 17 May 2011 18:04:56 -0300
parents
children 26d0513a8410
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Agendas/trunk/src/Agendas.Blog/Impl/BlogPublicador.cs	Tue May 17 18:04:56 2011 -0300
@@ -0,0 +1,20 @@
+using AltNetHispano.Agendas.Domain;
+
+namespace Agendas.Blog.Impl
+{
+  public class BlogPublicador : IPublicador
+  {
+    private readonly IPostWriterFactory _postWriterFactory;
+
+    public BlogPublicador(IPostWriterFactory postWriterFactory)
+    {
+      _postWriterFactory = postWriterFactory;
+    }
+
+    public void Publicar(Evento evento)
+    {
+      foreach (var track in evento.Tracks)
+        _postWriterFactory.GetPostWriter(track.Accion).WritePost(evento);
+    }
+  }
+}