view Agendas/trunk/src/Agendas.Blog/Impl/BlogPublicador.cs @ 99:3027c64344bd

agregado de llamadas a web service para crear posts en el blog de la comunidad agregado de tests sobre el publicador de blogs agregado de tests sobre el adapter del web service
author jorge.rowies
date Sat, 04 Jun 2011 22:33:05 -0300
parents 26d0513a8410
children 1d820f17fc75
line wrap: on
line source

using System.Collections.Generic;
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(IEnumerable<Track> tracks)
    {
      foreach (var track in tracks)
        _postWriterFactory.GetPostWriter(track.Accion).WritePost(track.Evento);
    }
  }
}