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

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

            return(TokenId1.Equals(TokenId2));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="TokenId1">A token identification.</param>
        /// <param name="TokenId2">Another token identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(Token_Id TokenId1,
                                          Token_Id TokenId2)

        => TokenId1.Equals(TokenId2);