예제 #1
0
파일: CommandKey.cs 프로젝트: t9mike/Mitten
        /// <summary>
        /// Determines whether the specified object is equal to the current instance.
        /// </summary>
        /// <param name="obj">An object to compare.</param>
        /// <returns>True if they are considered equal, otherwise false.</returns>
        public override bool Equals(object obj)
        {
            CommandKey key = obj as CommandKey;

            if (key == null)
            {
                return(false);
            }

            return(CommandKey.AreEqual(this, key));
        }
예제 #2
0
파일: CommandKey.cs 프로젝트: t9mike/Mitten
        /// <summary>
        /// Compares the objects for equality.
        /// </summary>
        /// <param name="lhs">The left hand side.</param>
        /// <param name="rhs">The right hand side.</param>
        /// <returns>True if they are equal.</returns>
        public static bool operator ==(CommandKey lhs, CommandKey rhs)
        {
            if (object.ReferenceEquals(lhs, rhs))
            {
                return(true);
            }

            if ((object)lhs == null || (object)rhs == null)
            {
                return(false);
            }

            return(CommandKey.AreEqual(lhs, rhs));
        }