/// <summary> /// Initializes a new instance of the <see cref="AllResponseTypesExample" /> class. /// Initializes a new instance of the <see cref="AllResponseTypesExample" />class. /// </summary> /// <param name="OpTypes">OpTypes.</param> /// <param name="MarketChangeMessage">MarketChangeMessage.</param> /// <param name="Connection">Connection.</param> /// <param name="OrderChangeMessage">OrderChangeMessage.</param> /// <param name="Status">Status.</param> public AllResponseTypesExample( OpTypesEnum?OpTypes = null, MarketChangeMessage MarketChangeMessage = null, ConnectionMessage Connection = null, OrderChangeMessage OrderChangeMessage = null, StatusMessage Status = null) { this.OpTypes = OpTypes; this.MarketChangeMessage = MarketChangeMessage; this.Connection = Connection; this.OrderChangeMessage = OrderChangeMessage; this.Status = Status; }
/// <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 (MarketChangeMessage != null) { hash = hash * 59 + MarketChangeMessage.GetHashCode(); } if (Connection != null) { hash = hash * 59 + Connection.GetHashCode(); } if (OrderChangeMessage != null) { hash = hash * 59 + OrderChangeMessage.GetHashCode(); } if (Status != null) { hash = hash * 59 + Status.GetHashCode(); } return(hash); } }
/// <summary> /// Returns true if AllResponseTypesExample instances are equal /// </summary> /// <param name="other">Instance of AllResponseTypesExample to be compared</param> /// <returns>Boolean</returns> public bool Equals(AllResponseTypesExample other) { // credit: http://stackoverflow.com/a/10454552/677735 if (other == null) { return(false); } return((OpTypes == other.OpTypes || OpTypes != null && OpTypes.Equals(other.OpTypes)) && (MarketChangeMessage == other.MarketChangeMessage || MarketChangeMessage != null && MarketChangeMessage.Equals(other.MarketChangeMessage)) && (Connection == other.Connection || Connection != null && Connection.Equals(other.Connection)) && (OrderChangeMessage == other.OrderChangeMessage || OrderChangeMessage != null && OrderChangeMessage.Equals(other.OrderChangeMessage)) && (Status == other.Status || Status != null && Status.Equals(other.Status))); }