Exemplo n.º 1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="AuthInfo1">A AuthInfo.</param>
        /// <param name="AuthInfo2">Another AuthInfo.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(AuthInfo AuthInfo1, AuthInfo AuthInfo2)
        {
            if ((Object)AuthInfo1 == null)
            {
                throw new ArgumentNullException("The given AuthInfo1 must not be null!");
            }

            return(AuthInfo1.CompareTo(AuthInfo2) > 0);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="AuthInfo1">A AuthInfo.</param>
        /// <param name="AuthInfo2">Another AuthInfo.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(AuthInfo AuthInfo1, AuthInfo AuthInfo2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(AuthInfo1, AuthInfo2))
            {
                return(true);
            }

            // If one is null, but not both, return false.
            if (((Object)AuthInfo1 == null) || ((Object)AuthInfo2 == null))
            {
                return(false);
            }

            return(AuthInfo1.Equals(AuthInfo2));
        }