public void Add(GuidObject item)
 {
     if (item.ParentFolder != null)
     {
         throw new Exception("Item already added in another folder");
     }
     Items.Add(item);
     item.SetParentFolder(this);
 }
 public bool Remove(GuidObject guidObject)
 {
     if (guidObject.ParentFolder == this)
     {
         if (Items.Remove(guidObject))
         {
             guidObject.SetParentFolder(null);
             return(true);
         }
     }
     return(false);
 }
            public bool Replace(GuidObject oldItem, GuidObject newItem)
            {
                for (int i = 0; i < Items.Count; i++)
                {
                    if (Items[i] == oldItem)
                    {
                        oldItem.SetParentFolder(null);
                        Items[i] = newItem;
                        newItem.SetParentFolder(this);
                        return(true);
                    }
                }

                return(false);
            }