/// <summary> /// Returns true if ProcessInfo instances are equal /// </summary> /// <param name="other">Instance of ProcessInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(ProcessInfo other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( StateName == other.StateName || StateName != null && StateName.Equals(other.StateName) ) && ( ActivityName == other.ActivityName || ActivityName != null && ActivityName.Equals(other.ActivityName) ) && ( SchemeId == other.SchemeId || SchemeId != null && SchemeId.Equals(other.SchemeId) ) && ( SchemeCode == other.SchemeCode || SchemeCode != null && SchemeCode.Equals(other.SchemeCode) ) && ( PreviousState == other.PreviousState || PreviousState != null && PreviousState.Equals(other.PreviousState) ) && ( PreviousStateForDirect == other.PreviousStateForDirect || PreviousStateForDirect != null && PreviousStateForDirect.Equals(other.PreviousStateForDirect) ) && ( PreviousStateForReverse == other.PreviousStateForReverse || PreviousStateForReverse != null && PreviousStateForReverse.Equals(other.PreviousStateForReverse) ) && ( PreviousActivity == other.PreviousActivity || PreviousActivity != null && PreviousActivity.Equals(other.PreviousActivity) ) && ( PreviousActivityForDirect == other.PreviousActivityForDirect || PreviousActivityForDirect != null && PreviousActivityForDirect.Equals(other.PreviousActivityForDirect) ) && ( PreviousActivityForReverse == other.PreviousActivityForReverse || PreviousActivityForReverse != null && PreviousActivityForReverse.Equals(other.PreviousActivityForReverse) ) && ( ParentProcessId == other.ParentProcessId || ParentProcessId != null && ParentProcessId.Equals(other.ParentProcessId) ) && ( RootProcessId == other.RootProcessId || RootProcessId != null && RootProcessId.Equals(other.RootProcessId) ) && ( InstanceStatus == other.InstanceStatus || InstanceStatus != null && InstanceStatus.Equals(other.InstanceStatus) ) && ( Transitions == other.Transitions || Transitions != null && Transitions.SequenceEqual(other.Transitions) ) && ( History == other.History || History != null && History.SequenceEqual(other.History) ) && ( ProcessParameters == other.ProcessParameters || ProcessParameters != null && ProcessParameters.Equals(other.ProcessParameters) )); }
/// <summary> /// Check if cell was alive (based on PreviousState). /// </summary> /// <returns>Previous live state</returns> public virtual bool WasAlive() { return(PreviousState.Equals(GetAliveValue())); }