Exemple #1
0
 private void CleanDuplicates()
 {
     lock (this)
     {
         AllPhotographs = AllPhotographs.Distinct().ToList();
     }
 }
Exemple #2
0
 public void AddRange(IEnumerable <Photograph> photos)
 {
     lock (this)
     {
         if (photos != null && photos.Count() > 0)
         {
             AllPhotographs.AddRange(photos);
             CleanDuplicates();
         }
     }
 }
Exemple #3
0
 public void Add(Photograph photo)
 {
     lock (this)
     {
         if (photo != null)
         {
             AllPhotographs.Add(photo);
             CleanDuplicates();
         }
     }
 }