public override int GetHashCode() { unchecked { var hashCode = Algorithm?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (Key != null ? Key.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Iv != null ? Iv.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (int)Mode; hashCode = (hashCode * 397) ^ KeyLength; return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (Iv.Length != 0) { hash ^= Iv.GetHashCode(); } if (CipherText.Length != 0) { hash ^= CipherText.GetHashCode(); } return(hash); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) hashCode = hashCode * 59 + Direction.GetHashCode(); hashCode = hashCode * 59 + TickDirection.GetHashCode(); if (Timestamp != null) { hashCode = hashCode * 59 + Timestamp.GetHashCode(); } if (Price != null) { hashCode = hashCode * 59 + Price.GetHashCode(); } if (TradeSeq != null) { hashCode = hashCode * 59 + TradeSeq.GetHashCode(); } if (TradeId != null) { hashCode = hashCode * 59 + TradeId.GetHashCode(); } if (Iv != null) { hashCode = hashCode * 59 + Iv.GetHashCode(); } if (IndexPrice != null) { hashCode = hashCode * 59 + IndexPrice.GetHashCode(); } if (Amount != null) { hashCode = hashCode * 59 + Amount.GetHashCode(); } if (InstrumentName != null) { hashCode = hashCode * 59 + InstrumentName.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (Iv.Length != 0) { hash ^= Iv.GetHashCode(); } if (CipherText.Length != 0) { hash ^= CipherText.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) hashCode = hashCode * 59 + Direction.GetHashCode(); hashCode = hashCode * 59 + FeeCurrency.GetHashCode(); if (OrderId != null) { hashCode = hashCode * 59 + OrderId.GetHashCode(); } if (Timestamp != null) { hashCode = hashCode * 59 + Timestamp.GetHashCode(); } if (Price != null) { hashCode = hashCode * 59 + Price.GetHashCode(); } if (Iv != null) { hashCode = hashCode * 59 + Iv.GetHashCode(); } if (TradeId != null) { hashCode = hashCode * 59 + TradeId.GetHashCode(); } if (Fee != null) { hashCode = hashCode * 59 + Fee.GetHashCode(); } hashCode = hashCode * 59 + OrderType.GetHashCode(); if (TradeSeq != null) { hashCode = hashCode * 59 + TradeSeq.GetHashCode(); } if (SelfTrade != null) { hashCode = hashCode * 59 + SelfTrade.GetHashCode(); } hashCode = hashCode * 59 + State.GetHashCode(); if (Label != null) { hashCode = hashCode * 59 + Label.GetHashCode(); } if (IndexPrice != null) { hashCode = hashCode * 59 + IndexPrice.GetHashCode(); } if (Amount != null) { hashCode = hashCode * 59 + Amount.GetHashCode(); } if (InstrumentName != null) { hashCode = hashCode * 59 + InstrumentName.GetHashCode(); } hashCode = hashCode * 59 + TickDirection.GetHashCode(); if (MatchingId != null) { hashCode = hashCode * 59 + MatchingId.GetHashCode(); } hashCode = hashCode * 59 + Liquidity.GetHashCode(); return(hashCode); } }