/// <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 (ProcessId != null) { hashCode = hashCode * 59 + ProcessId.GetHashCode(); } if (ActorIdentityId != null) { hashCode = hashCode * 59 + ActorIdentityId.GetHashCode(); } if (ExecutorIdentityId != null) { hashCode = hashCode * 59 + ExecutorIdentityId.GetHashCode(); } if (FromActivityName != null) { hashCode = hashCode * 59 + FromActivityName.GetHashCode(); } if (FromStateName != null) { hashCode = hashCode * 59 + FromStateName.GetHashCode(); } if (IsFinalised != null) { hashCode = hashCode * 59 + IsFinalised.GetHashCode(); } if (ToActivityName != null) { hashCode = hashCode * 59 + ToActivityName.GetHashCode(); } if (ToStateName != null) { hashCode = hashCode * 59 + ToStateName.GetHashCode(); } if (TransitionClassifier != null) { hashCode = hashCode * 59 + TransitionClassifier.GetHashCode(); } if (TransitionTime != null) { hashCode = hashCode * 59 + TransitionTime.GetHashCode(); } if (TriggerName != null) { hashCode = hashCode * 59 + TriggerName.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if Transition instances are equal /// </summary> /// <param name="other">Instance of Transition to be compared</param> /// <returns>Boolean</returns> public bool Equals(Transition other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( ProcessId == other.ProcessId || ProcessId != null && ProcessId.Equals(other.ProcessId) ) && ( ActorIdentityId == other.ActorIdentityId || ActorIdentityId != null && ActorIdentityId.Equals(other.ActorIdentityId) ) && ( ExecutorIdentityId == other.ExecutorIdentityId || ExecutorIdentityId != null && ExecutorIdentityId.Equals(other.ExecutorIdentityId) ) && ( FromActivityName == other.FromActivityName || FromActivityName != null && FromActivityName.Equals(other.FromActivityName) ) && ( FromStateName == other.FromStateName || FromStateName != null && FromStateName.Equals(other.FromStateName) ) && ( IsFinalised == other.IsFinalised || IsFinalised != null && IsFinalised.Equals(other.IsFinalised) ) && ( ToActivityName == other.ToActivityName || ToActivityName != null && ToActivityName.Equals(other.ToActivityName) ) && ( ToStateName == other.ToStateName || ToStateName != null && ToStateName.Equals(other.ToStateName) ) && ( TransitionClassifier == other.TransitionClassifier || TransitionClassifier != null && TransitionClassifier.Equals(other.TransitionClassifier) ) && ( TransitionTime == other.TransitionTime || TransitionTime != null && TransitionTime.Equals(other.TransitionTime) ) && ( TriggerName == other.TriggerName || TriggerName != null && TriggerName.Equals(other.TriggerName) )); }