/// <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)); }
/// <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)); }