Exemple #1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="AuthToken1">An authentication token.</param>
        /// <param name="AuthToken2">Another authentication token.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(Auth_Token AuthToken1, Auth_Token AuthToken2)
        {
            if ((Object)AuthToken1 == null)
            {
                throw new ArgumentNullException(nameof(AuthToken1), "The given AuthToken1 must not be null!");
            }

            return(AuthToken1.CompareTo(AuthToken2) > 0);
        }
Exemple #2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="AuthToken1">An authentication token.</param>
        /// <param name="AuthToken2">Another authentication token.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(Auth_Token AuthToken1, Auth_Token AuthToken2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(AuthToken1, AuthToken2))
            {
                return(true);
            }

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

            return(AuthToken1.Equals(AuthToken2));
        }