Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Blog/Impl/PostWriter.cs @ 74:bc46e7426c80
Refactoring de acciones según la definición del diagrama de estados en assembla
(https://www.assembla.com/spaces/altnet-hispano/wiki/Estados_de_un_evento)
author | nelopauselli |
---|---|
date | Mon, 23 May 2011 20:13:37 -0300 |
parents | c7264bfc4b71 |
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(); } } }