/// <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 :) if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Legacy != null) { hashCode = hashCode * 59 + Legacy.GetHashCode(); } if (Demo != null) { hashCode = hashCode * 59 + Demo.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = TotalSpent.GetHashCode(); hashCode = (hashCode * 397) ^ TotalReceived.GetHashCode(); hashCode = (hashCode * 397) ^ Balance.GetHashCode(); hashCode = (hashCode * 397) ^ Txi; hashCode = (hashCode * 397) ^ Txo; hashCode = (hashCode * 397) ^ TxsCount; hashCode = (hashCode * 397) ^ (Legacy != null ? Legacy.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Addresses != null ? Addresses.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (strategyCase_ == StrategyOneofCase.None) { hash ^= None.GetHashCode(); } if (strategyCase_ == StrategyOneofCase.Legacy) { hash ^= Legacy.GetHashCode(); } hash ^= (int)strategyCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }