Пример #1
0
        /// <summary>
        /// Determines whether <see cref="CompiledRegexList{T}"/> contains the exact same value.
        /// </summary>
        public virtual bool Contains(T value)
        {
            foreach (var item in Items)
            {
                if (CompiledRegexBase.Equals(item, value))
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #2
0
        /// <summary>
        /// Determines the index of a <see cref="CompiledRegexBase"/> with the exact same value.
        /// </summary>
        public virtual int IndexOf(T value)
        {
            for (int i = 0; i < Items.Count; i++)
            {
                if (CompiledRegexBase.Equals(Items[i], value))
                {
                    return(i);
                }
            }

            return(-1);
        }