/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns> /// A hash code for the current <see cref="PresenterDiscoveryResult"/>. /// </returns> public override int GetHashCode() { return (ViewInstances.GetHashCode() | Message.GetHashCode() | Bindings.GetHashCode()); }
/// <summary> /// Determines whether the specified <see cref="PresenterDiscoveryResult"/> is equal to the current <see cref="PresenterDiscoveryResult"/>. /// </summary> /// <returns> /// true if the specified <see cref="PresenterDiscoveryResult"/> is equal to the current <see cref="PresenterDiscoveryResult"/>; otherwise, false. /// </returns> /// <param name="obj">The <see cref="PresenterDiscoveryResult"/> to compare with the current <see cref="PresenterDiscoveryResult"/>.</param> public override bool Equals(object obj) { var target = obj as PresenterDiscoveryResult; if (target == null) { return(false); } return (ViewInstances.SetEqual(target.ViewInstances) && Message.Equals(target.Message, StringComparison.OrdinalIgnoreCase) && Bindings.SetEqual(target.Bindings)); }