# HG changeset patch # User nelo@MTEySS.neluz.int # Date 1300056617 10800 # Node ID 05996fa19e048efc4770d558f9317ef7b5cc738c # Parent 9d6b28a696d11d4d06ddce208e9e82339a763914 Unificamos Van y Cafe en Evento Agenda.Publicar con los valores como parámetros independientes diff -r 9d6b28a696d1 -r 05996fa19e04 Agendas/trunk/src/Agendas.Domain/Agenda.cs --- a/Agendas/trunk/src/Agendas.Domain/Agenda.cs Sun Mar 13 19:30:58 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Domain/Agenda.cs Sun Mar 13 19:50:17 2011 -0300 @@ -23,22 +23,20 @@ public Guid Id { get; set; } - public void Publicar(Evento evento) + public void Publicar(string titulo, string ponente, DateTime? fecha) { + var evento = new Evento{Titulo=titulo, Ponente = ponente, Fecha = fecha}; + if (!evento.Fecha.HasValue) throw new ValidationException(); if (_publicador != null) _publicador.Publicar(evento); if (NoEstaAutenticado(_seguridad)) throw new UsuarioNoAutenticadoException(); - _eventosPublicados.Add(evento); - } + if (string.IsNullOrWhiteSpace(evento.Ponente)) + throw new ValidationException(); - public void Publicar(Van van) - { - if (string.IsNullOrWhiteSpace(van.Ponente)) - throw new ValidationException(); - Publicar(van as Evento); + _eventosPublicados.Add(evento); } public void Recordar(Evento evento) @@ -47,13 +45,13 @@ _recordador.Recordar(evento); } - public void Proponer(Van van) + public void Proponer(Evento evento) { - if (string.IsNullOrWhiteSpace(van.Titulo)) + if (string.IsNullOrWhiteSpace(evento.Titulo)) throw new ValidationException(); if (NoEstaAutenticado(_seguridad)) throw new ValidationException(); - _eventosPropuestos.Add(van); + _eventosPropuestos.Add(evento); } public IList GetEventosPropuestos() diff -r 9d6b28a696d1 -r 05996fa19e04 Agendas/trunk/src/Agendas.Domain/Agendas.Domain.csproj --- a/Agendas/trunk/src/Agendas.Domain/Agendas.Domain.csproj Sun Mar 13 19:30:58 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Domain/Agendas.Domain.csproj Sun Mar 13 19:50:17 2011 -0300 @@ -42,7 +42,6 @@ - @@ -51,7 +50,6 @@ -