view Agendas/trunk/src/Agendas.Blog/Impl/BlogPublicador.cs @ 89:24e9488ac152

mapeo de property UrlInvitacion entre viewmodel y entity
author jorge.rowies
date Tue, 31 May 2011 16:31:24 -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);
    }
  }
}