Ejemplo n.º 1
0
        public int CompareTo(object obj)
        {
            int result = 0;

            if (obj != null && obj is QueryIdentifier)
            {
                QueryIdentifier other = (QueryIdentifier)obj;
                if (other._refCount > _refCount)
                {
                    result = -1;
                }
                else if (other._refCount < _refCount)
                {
                    result = 1;
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
 public override bool Equals(object obj)
 {
     if (obj == null)
     {
         return(false);
     }
     else
     {
         QueryIdentifier other = obj as QueryIdentifier;
         if (other == null)
         {
             return(_query.Equals(obj.ToString()));
         }
         else
         {
             return(this.Query.Equals(other.Query));
         }
     }
 }