Пример #1
0
        /// <summary>
        /// Returns true if ExecuteParameters instances are equal
        /// </summary>
        /// <param name="other">Instance of ExecuteParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ExecuteParameters other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                     ) &&
                 (
                     IdentityId == other.IdentityId ||
                     IdentityId != null &&
                     IdentityId.Equals(other.IdentityId)
                 ) &&
                 (
                     Parameter == other.Parameter ||
                     Parameter != null &&
                     Parameter.Equals(other.Parameter)
                 ) &&
                 (
                     ProcessInstance == other.ProcessInstance ||
                     ProcessInstance != null &&
                     ProcessInstance.Equals(other.ProcessInstance)
                 ));
        }
Пример #2
0
        /// <summary>
        /// Returns true if HistoryItem instances are equal
        /// </summary>
        /// <param name="other">Instance of HistoryItem to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(HistoryItem other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     ProcessId == other.ProcessId ||
                     ProcessId != null &&
                     ProcessId.Equals(other.ProcessId)
                 ) &&
                 (
                     IdentityId == other.IdentityId ||
                     IdentityId != null &&
                     IdentityId.Equals(other.IdentityId)
                 ) &&
                 (
                     AllowedToEmployeeNames == other.AllowedToEmployeeNames ||
                     AllowedToEmployeeNames != null &&
                     AllowedToEmployeeNames.Equals(other.AllowedToEmployeeNames)
                 ) &&
                 (
                     TransitionTime == other.TransitionTime ||
                     TransitionTime != null &&
                     TransitionTime.Equals(other.TransitionTime)
                 ) &&
                 (
                     Order == other.Order ||
                     Order != null &&
                     Order.Equals(other.Order)
                 ) &&
                 (
                     InitialState == other.InitialState ||
                     InitialState != null &&
                     InitialState.Equals(other.InitialState)
                 ) &&
                 (
                     DestinationState == other.DestinationState ||
                     DestinationState != null &&
                     DestinationState.Equals(other.DestinationState)
                 ) &&
                 (
                     Command == other.Command ||
                     Command != null &&
                     Command.Equals(other.Command)
                 ));
        }
Пример #3
0
 public void TestIdentityIdIEquatableNotEqual()
 {
     IdentityId one=new IdentityId();
     IdentityId two=new IdentityId();
     Assert.IsFalse(one.Equals(two));
     Assert.IsFalse(two.Equals(one));
     Assert.IsFalse(one==two);
     Assert.IsFalse(two==one);
     Assert.IsTrue(one!=two);
     Assert.IsTrue(two != one);
 }
Пример #4
0
 public void TestIdentityIdIEquatableEqual()
 {
     Guid id = Guid.NewGuid();
     IdentityId one = new IdentityId(id);
     IdentityId two = new IdentityId(id);
     Assert.IsTrue(one.Equals(two));
     Assert.IsTrue(two.Equals(one));
     Assert.IsTrue(one == two);
     Assert.IsTrue(two == one);
     Assert.IsFalse(one != two);
     Assert.IsFalse(two != one);
 }