diff Agendas/trunk/src/Agendas.Twitter/Writers/TwitterHelper.cs @ 229:33976aea7546

Varios Ponentes en calendario
author nelopauselli
date Wed, 28 Sep 2011 19:14:49 -0300
parents 9f61e8555114
children e5959f3405e0
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Twitter/Writers/TwitterHelper.cs	Wed Sep 28 18:51:53 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Twitter/Writers/TwitterHelper.cs	Wed Sep 28 19:14:49 2011 -0300
@@ -1,25 +1,12 @@
-using System.Collections.Generic;
-using System.Linq;
-using AltNetHispano.Agendas.Domain;
+using AltNetHispano.Agendas.Domain;
 
 namespace AltNetHispano.Agendas.Twitter.Writers
 {
 	public static class TwitterHelper
 	{
-		public static string GetPonentes(IEnumerable<Persona> ponentes)
+		public static string GetPonentes(Evento evento)
 		{
-			var nombres = ponentes.Select(GetPonente).ToArray();
-			string texto = string.Empty;
-			for (int i = 0; i < nombres.Length; i++)
-			{
-				var nombre = nombres[i];
-				if (i == nombre.Length-1)
-					texto += " y ";
-				else if (i != 0)
-					texto += ", ";
-				texto += nombre;
-			}
-			return texto;
+			return evento.GetPonentesAsString(GetPonente);
 		}
 
 		private static string GetPonente(Persona ponente)
@@ -28,5 +15,6 @@
 				return "@" + ponente.Twitter;
 			return ponente.Nombre;
 		}
+
 	}
 }
\ No newline at end of file