diff Agendas/trunk/src/Agendas.Blog/Impl/PostWriter.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 c7264bfc4b71
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Agendas/trunk/src/Agendas.Blog/Impl/PostWriter.cs	Tue May 17 18:04:56 2011 -0300
@@ -0,0 +1,31 @@
+using System;
+using AltNetHispano.Agendas.Domain;
+
+namespace Agendas.Blog.Impl
+{
+  public abstract class PostWriter : IPostWriter
+  {
+    public virtual void WritePost(Evento evento)
+    {
+      var title = GetTitle(evento);
+      var body = GetBody(evento);
+      this.ExecuteService(title, body);
+    }
+
+    protected abstract string GetBody(Evento evento);
+
+    protected abstract string GetTitle(Evento evento);
+
+    protected string GetNombreUsuario(Evento evento)
+    {
+      return string.Empty;
+      //return evento.Tracks.Single(t => t.Accion == Accion.Realizar).Usuario; TODO (property Usuario debe ser publica)
+    }
+
+    protected void ExecuteService(string title, string body)
+    {
+      //TODO: invocar al web service
+      throw new NotImplementedException();
+    }
+  }
+}
\ No newline at end of file