Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs @ 19:74eb4577d447
HttpContext identity provider
Requerimiento de autenticación para registrar un nuevo evento o modificar uno existente
author | nelo@MTEySS.neluz.int |
---|---|
date | Mon, 14 Mar 2011 00:35:43 -0300 |
parents | 08b9e96132a5 |
children | 41b283d27e3e |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs Mon Mar 14 00:26:44 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs Mon Mar 14 00:35:43 2011 -0300 @@ -5,11 +5,20 @@ { public static class AgendaFactory { - private static readonly Agenda Agenda = new Agenda(null, null, null, new EventoRepository()); + private static Agenda _agenda; + private static ISeguridad _seguridad; + + public static Agenda GetAgenda() + { + if (_agenda==null) + _agenda = new Agenda(null, null, _seguridad, new EventoRepository()); - public static Agenda GetAgenda() - { - return Agenda; + return _agenda; } + + public static void SetIdentityProvider(ISeguridad seguridad) + { + _seguridad = seguridad; + } } } \ No newline at end of file