annotate Agendas/trunk/src/Agendas.Twitter/TwitterStringHelper.cs @ 300:48ab8788bd19

#200: Patrocinadores: Agregar link al sitio web.
author juanjose.montesdeocaarbos
date Mon, 27 Feb 2012 14:45:12 -0300
parents e5959f3405e0
children
rev   line source
217
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
1 using System;
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
2 using AltNetHispano.Agendas.Domain;
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
3
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
4 namespace AltNetHispano.Agendas.Twitter
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
5 {
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
6 public static class TwitterStringHelper
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
7 {
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
8 public static string TipoEvento(TipoEvento tipo)
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
9 {
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
10 switch (tipo)
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
11 {
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
12 case Domain.TipoEvento.Van:
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
13 return "La VAN";
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
14 case Domain.TipoEvento.Cafe:
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
15 return "El " + tipo;
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
16 case Domain.TipoEvento.GrupoEstudio:
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
17 return "El Grupo de estudio";
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
18 default:
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
19 return string.Empty;
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
20 }
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
21 }
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
22
231
e5959f3405e0 Eventos sin ponentes
nelopauselli
parents: 217
diff changeset
23 public static string Ponentes(Evento evento)
217
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
24 {
231
e5959f3405e0 Eventos sin ponentes
nelopauselli
parents: 217
diff changeset
25 var ponentes = evento.GetPonentesAsString(p => "@" + p.Twitter);
e5959f3405e0 Eventos sin ponentes
nelopauselli
parents: 217
diff changeset
26 return !string.IsNullOrWhiteSpace(ponentes) ? " con " + ponentes : string.Empty;
217
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
27 }
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
28
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
29 public static string Hora(DateTime fechaInicio)
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
30 {
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
31 return fechaInicio.Minute == 0 ? fechaInicio.Hour + "GMT" : fechaInicio.Hour + ":" + fechaInicio.Minute + "GMT";
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
32 }
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
33 }
c4c60e034103 sugerencia de recordatorios
nelopauselli
parents:
diff changeset
34 }