Ejemplo n.º 1
0
 public bool Contains(Object item)
 {
     foreach (Category c in this.categories.Values)
     {
         if (c.Contains(item.Name))
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 2
0
 public void Add(Object item)
 {
     if (item == null)
     {
         return;
     }
     if (item.Category == null)
     {
         throw new ArgumentException("Cannot add objects without a category");
     }
     if (!this.categories.ContainsKey(item.Category.Name))
     {
         this.Add(item.Category);
     }
     else
     {
         this.categories[item.Category.Name].AddObject(item);
     }
 }