Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
 /// <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);
 }
Exemplo n.º 3
0
 /// <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));
 }
Exemplo n.º 4
0
        /// <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);
        }
Exemplo n.º 5
0
 /// <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);
 }