コード例 #1
0
        /// <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)
                 ));
        }