/// <summary> /// Determines whether this PersistableItemDictionary contains a specific value. /// </summary> /// <param name="value"> /// The PersistableItem value to locate in this PersistableItemDictionary. /// </param> /// <returns> /// true if this PersistableItemDictionary contains an element with the specified value; /// otherwise, false. /// </returns> public virtual bool ContainsValue(PersistableItem value) { foreach (PersistableItem item in this.Dictionary.Values) { if (item == value) { return(true); } } return(false); }
/// <summary> /// Determines whether this PersistableItemDictionary contains a specific value. /// </summary> /// <param name="value"> /// The PersistableItem value to locate in this PersistableItemDictionary. /// </param> /// <returns> /// true if this PersistableItemDictionary contains an element with the specified value; /// otherwise, false. /// </returns> public virtual bool ContainsValue(PersistableItem value) { foreach (PersistableItem item in this.Dictionary.Values) { if (item == value) return true; } return false; }
/// <summary> /// Adds an element with the specified key and value to this PersistableItemDictionary. /// </summary> /// <param name="key"> /// The String key of the element to add. /// </param> /// <param name="value"> /// The PersistableItem value of the element to add. /// </param> public virtual void Add(String key, PersistableItem value) { this.Dictionary.Add(key, value); }
protected void AddPersistableItem(PersistableItem item) { m_Dictionary.Add(item.Name, item); }