Example #1
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (WorkflowID != null ? WorkflowID.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ActivityID != null ? ActivityID.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ScenarioID != null ? ScenarioID.GetHashCode() : 0);
         return(hashCode);
     }
 }
Example #2
0
 public bool Equals(ISimulationKey other)
 {
     if (other == null)
     {
         return(false);
     }
     return(WorkflowID.Equals(other.WorkflowID) &&
            ActivityID.Equals(other.ActivityID) &&
            ScenarioID.Equals(other.ScenarioID));
 }
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = WorkflowID?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (ActivityID?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ScenarioID?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }