示例#1
0
文件: Index.cs 项目: d3m0n5/GDB
        public static bool Contains(this StringAccessor @string, IEnumerable <string> substrings)
        {
            if (substrings == null || substrings.Count() == 0)
            {
                return(true);
            }
            if (@string == (object)null)
            {
                throw new ArgumentNullException("string");
            }

            return(Contains((string)@string, substrings));
        }
示例#2
0
        /// <summary>
        /// Determines whether this instance and a specified object have the same value.
        /// </summary>
        /// <param name="obj">The StringAccessor to compare to this instance.</param>
        /// <returns>true if obj is a StringAccessor and its value is the same as this instance; otherwise, false.</returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            StringAccessor b = obj as StringAccessor;

            if ((object)b == null)
            {
                string s = obj as string;
                if ((object)s == null)
                {
                    return(false);
                }
                return(this.ToString() == s);
            }

            return(this.ToString() == b.ToString());
        }
示例#3
0
文件: Index.cs 项目: d3m0n5/GDB
 public static bool Contains(this StringAccessor @string, params string[] substrings)
 {
     return(Contains((string)@string, substrings as IEnumerable <string>));
 }
示例#4
0
 internal _iterator(StringAccessor target)
 {
     targetPtr = target.m_ptr;
     endPtr    = target.m_ptr + target.length;
 }