/// <summary> /// Removes a cache host element from the collection. /// </summary> /// <param name="item">The cache host element.</param> /// <returns>true if the cache host element was removed, false otherwise.</returns> public bool Remove(CacheHostElement item) { if (BaseIndexOf(item) >= 0) { BaseRemove(item); return(true); } return(false); }
/// <summary> /// Adds a cache host element to the collection. /// </summary> /// <param name="item">The cache host element.</param> public void Add(CacheHostElement item) { BaseAdd(item); }
/// <summary> /// Returns the index of the cache host element. /// </summary> /// <param name="service">The cache host element.</param> /// <returns>The index.</returns> public int IndexOf(CacheHostElement service) { return(BaseIndexOf(service)); }
/// <summary> /// Gets the key of a given configuration element. /// </summary> /// <param name="element">The configuration element.</param> /// <returns>The key.</returns> protected override object GetElementKey(ConfigurationElement element) { CacheHostElement service = (CacheHostElement)element; return(service.Address + ":" + service.Port); }
/// <summary> /// Determines whether or not the collection contains the specified cache host element. /// </summary> /// <param name="item">The cache host element.</param> /// <returns>true if the collection contains the element, false otherwise.</returns> public bool Contains(CacheHostElement item) { return(BaseIndexOf(item) >= 0); }