Beispiel #1
0
        public int CompareTo(object obj)
        {
            IMethodReference imr = obj as IMethodReference;

            if (imr == null)
            {
                return(-1);
            }
            return(CompareItems.CompareMethodReferences(this, imr));
        }
Beispiel #2
0
        public int CompareTo(object obj)
        {
            if (this == obj)
            {
                return(0);
            }

            IMethodReference imr = obj as IMethodReference;

            if (imr == null)
            {
                throw new ArgumentException("Cannot compare a MethodInstanceDeclaration to a null reference");
            }
            return(CompareItems.CompareMethodReferences(this, imr));
        }
        /// <summary>
        /// Compare one method reference to another
        /// </summary>
        /// <param name="obj">Method reference to compare to</param>
        /// <returns>-1, 0 or 1</returns>
        public int CompareTo(object obj)
        {
            if (this == obj)
            {
                return(0);
            }

            IMethodReference imr = obj as IMethodReference;

            if (imr == null)
            {
                throw new NotSupportedException("Cannot compare an IMethodReference to a null reference");
            }
            return(CompareItems.CompareMethodReferences(this, imr));
        }