Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Blog/Impl/PostWriter.cs @ 81:c76661cff260
Workflow de acciones sobre un evento (camino feliz)
author | nelopauselli |
---|---|
date | Tue, 24 May 2011 19:21:20 -0300 |
parents | bc46e7426c80 |
children | db4b1e2cae49 3027c64344bd |
line wrap: on
line source
using System; using System.Linq; 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 evento.Tracks.Single(t => t.Accion == Accion.Publicar).Usuario; } protected void ExecuteService(string title, string body) { //TODO: invocar al web service throw new NotImplementedException(); } } }