/// <summary>
        /// Removes a Teraque.DataIndex from the collection.
        /// </summary>
        /// <param name="dataIndex">The index to be removed from the collection.</param>
        public void Remove(DataIndex dataIndex)
        {
            // Validate the argument before using it.
            if (dataIndex == null)
            {
                throw new ArgumentNullException("dataIndex");
            }

            // The list is used for iteration, the table is used for fast access.
            this.arrayList.Remove(dataIndex);
            this.hashTable.Remove(dataIndex.IndexName);
        }
Beispiel #2
0
        /// <summary>
        /// Determines whether two DataIndex objects have the same value.
        /// </summary>
        /// <param name="obj">The DataIndex to compare to this instance.</param>
        /// <returns>true if obj is a String and its value is the same as this instance; otherwise, false.</returns>
        public override bool Equals(Object obj)
        {
            // Compare the index name when comparing to an equivalent type.
            DataIndex dataIndex = obj as DataIndex;

            if (dataIndex != null)
            {
                return(this.IndexName.Equals(dataIndex.IndexName));
            }

            // There is no equality to other types.
            return(false);
        }