Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Blog/Impl/PublicarReunionPostWriter.cs @ 109:6bd9be78caa0
Merge
author | Nelo@Kenia.neluz.int |
---|---|
date | Tue, 07 Jun 2011 23:21:07 -0300 |
parents | 80c22175c9b5 |
children |
line wrap: on
line source
using System; using System.Globalization; using Agendas.Blog.Exceptions; using Agendas.Blog.Properties; using AltNetHispano.Agendas.Domain; namespace Agendas.Blog.Impl { public class PublicarReunionPostWriter : PostWriter { public PublicarReunionPostWriter(IPostWriterWebService postWriterWebService) : base(postWriterWebService) { } protected override string GetTitle(Track track) { string resourceName = getTitleResourceName(track); return string.Format(CultureInfo.InvariantCulture, resourceName, track.Evento.NumeroOrden, //# de VAN en el historial track.Evento.Titulo //Titulo del evento ); } private string getTitleResourceName(Track track) { string resourceName; if (track.Evento.Tipo == TipoEvento.Van) resourceName = Resources.VAN_Publicar_Title; else if (track.Evento.Tipo == TipoEvento.Cafe) resourceName = Resources.Cafe_Publicar_Title; else throw new TipoEventoNoSoportadoException(track.Evento.Tipo.ToString()); return resourceName; } protected override string GetBody(Track track) { string resourceName = getBodyResourceName(track); return string.Format(CultureInfo.InvariantCulture, resourceName, track.Evento.UrlWiki, //Url al video publicado en la wiki GetNombreUsuario(track) //Usuario que postea en el blog ); } private string getBodyResourceName(Track track) { string resourceName; if (track.Evento.Tipo == TipoEvento.Van) resourceName = Resources.VAN_Publicar_Body; else if (track.Evento.Tipo == TipoEvento.Cafe) resourceName = Resources.Cafe_Publicar_Body; else throw new TipoEventoNoSoportadoException(track.Evento.Tipo.ToString()); return resourceName; } } }