Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Repositories.Memory/AgendaRepository.cs @ 3:5f007e266509
code cleanup
author | nelopauselli |
---|---|
date | Sat, 22 Jan 2011 20:23:50 -0300 |
parents | c03560ae4762 |
children | 49b572535156 |
comparison
equal
deleted
inserted
replaced
2:c03560ae4762 | 3:5f007e266509 |
---|---|
6 namespace Agendas.Repositories.Memory | 6 namespace Agendas.Repositories.Memory |
7 { | 7 { |
8 public class AgendaRepository : IAgendaRepository | 8 public class AgendaRepository : IAgendaRepository |
9 { | 9 { |
10 protected static readonly IDictionary<Guid, Agenda> Agendas = new Dictionary<Guid, Agenda>(); | 10 protected static readonly IDictionary<Guid, Agenda> Agendas = new Dictionary<Guid, Agenda>(); |
11 | |
12 #region IAgendaRepository Members | |
11 | 13 |
12 public void Save(Agenda agenda) | 14 public void Save(Agenda agenda) |
13 { | 15 { |
14 if (Guid.Empty.Equals(agenda.Id)) | 16 if (Guid.Empty.Equals(agenda.Id)) |
15 { | 17 { |
30 | 32 |
31 public Agenda Get(Guid agendaId) | 33 public Agenda Get(Guid agendaId) |
32 { | 34 { |
33 Agenda agenda; | 35 Agenda agenda; |
34 return Agendas.TryGetValue(agendaId, out agenda) ? agenda : null; | 36 return Agendas.TryGetValue(agendaId, out agenda) ? agenda : null; |
37 } | |
35 | 38 |
36 } | 39 #endregion |
37 } | 40 } |
38 } | 41 } |