/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { var hash = 41; // Suitable nullity checks etc, of course :) if (OpTypes != null) { hash = hash * 59 + OpTypes.GetHashCode(); } if (Heartbeat != null) { hash = hash * 59 + Heartbeat.GetHashCode(); } if (OrderSubscriptionMessage != null) { hash = hash * 59 + OrderSubscriptionMessage.GetHashCode(); } if (MarketSubscription != null) { hash = hash * 59 + MarketSubscription.GetHashCode(); } if (Authentication != null) { hash = hash * 59 + Authentication.GetHashCode(); } return(hash); } }
/// <summary> /// Returns true if AllRequestTypesExample instances are equal /// </summary> /// <param name="other">Instance of AllRequestTypesExample to be compared</param> /// <returns>Boolean</returns> public bool Equals(AllRequestTypesExample other) { // credit: http://stackoverflow.com/a/10454552/677735 if (other == null) { return(false); } return((OpTypes == other.OpTypes || OpTypes != null && OpTypes.Equals(other.OpTypes)) && (Heartbeat == other.Heartbeat || Heartbeat != null && Heartbeat.Equals(other.Heartbeat)) && (OrderSubscriptionMessage == other.OrderSubscriptionMessage || OrderSubscriptionMessage != null && OrderSubscriptionMessage.Equals(other.OrderSubscriptionMessage)) && (MarketSubscription == other.MarketSubscription || MarketSubscription != null && MarketSubscription.Equals(other.MarketSubscription)) && (Authentication == other.Authentication || Authentication != null && Authentication.Equals(other.Authentication))); }