Beispiel #1
0
        /// <summary>
        /// Compara com outra instancia.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            QueryIdentifier identifier = obj as QueryIdentifier;

            if (identifier == null)
            {
                return(_query.Equals(obj.ToString().ToLower()));
            }
            return(this.Query.Equals(identifier.Query));
        }
Beispiel #2
0
        /// <summary>
        /// Compara com outra instancia.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public int CompareTo(object obj)
        {
            int num = 0;

            if ((obj != null) && (obj is QueryIdentifier))
            {
                QueryIdentifier identifier = (QueryIdentifier)obj;
                if (identifier._refCount > _refCount)
                {
                    return(-1);
                }
                if (identifier._refCount < _refCount)
                {
                    num = 1;
                }
            }
            return(num);
        }