Esempio n. 1
0
 public void Delete()
 {
     if (!_newObject)
     {
         _businessObject.Remove();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Removes the item from the index.
        /// </summary>
        public void RemoveFromIndex(object item, int itemKey)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }

            int indexKey = GetIndexKey(item);

            if (ItemGroups.TryGetValue(indexKey, out SortedDictionary <int, object> group))
            {
                group.Remove(itemKey);
                if (group.Count == 0)
                {
                    ItemGroups.Remove(indexKey);
                }
            }
        }