Ejemplo n.º 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>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = Id;
         result = (result * 397) ^ (State != null ? State.GetHashCode() : 0);
         result = (result * 397) ^ StateEnum.GetHashCode();
         result = (result * 397) ^ Project;
         result = (result * 397) ^ Run;
         result = (result * 397) ^ Clone;
         result = (result * 397) ^ Gen;
         result = (result * 397) ^ (Core != null ? Core.GetHashCode() : 0);
         result = (result * 397) ^ (UnitId != null ? UnitId.GetHashCode() : 0);
         result = (result * 397) ^ (PercentDone != null ? PercentDone.GetHashCode() : 0);
         result = (result * 397) ^ TotalFrames;
         result = (result * 397) ^ FramesDone;
         result = (result * 397) ^ (Assigned != null ? Assigned.GetHashCode() : 0);
         result = (result * 397) ^ (AssignedDateTime.HasValue ? AssignedDateTime.Value.GetHashCode() : 0);
         result = (result * 397) ^ (Timeout != null ? Timeout.GetHashCode() : 0);
         result = (result * 397) ^ (TimeoutDateTime.HasValue ? TimeoutDateTime.Value.GetHashCode() : 0);
         result = (result * 397) ^ (Deadline != null ? Deadline.GetHashCode() : 0);
         result = (result * 397) ^ (DeadlineDateTime.HasValue ? DeadlineDateTime.Value.GetHashCode() : 0);
         result = (result * 397) ^ (WorkServer != null ? WorkServer.GetHashCode() : 0);
         result = (result * 397) ^ (WorkServerIPAddress != null ? WorkServerIPAddress.GetHashCode() : 0);
         result = (result * 397) ^ (CollectionServer != null ? CollectionServer.GetHashCode() : 0);
         result = (result * 397) ^ (CollectionServerIPAddress != null ? CollectionServerIPAddress.GetHashCode() : 0);
         result = (result * 397) ^ (WaitingOn != null ? WaitingOn.GetHashCode() : 0);
         result = (result * 397) ^ Attempts;
         result = (result * 397) ^ (NextAttempt != null ? NextAttempt.GetHashCode() : 0);
         result = (result * 397) ^ (NextAttemptTimeSpan.HasValue ? NextAttemptTimeSpan.Value.GetHashCode() : 0);
         result = (result * 397) ^ Slot;
         result = (result * 397) ^ (Eta != null ? Eta.GetHashCode() : 0);
         result = (result * 397) ^ (EtaTimeSpan.HasValue ? EtaTimeSpan.Value.GetHashCode() : 0);
         result = (result * 397) ^ Ppd.GetHashCode();
         result = (result * 397) ^ (Tpf != null ? Tpf.GetHashCode() : 0);
         result = (result * 397) ^ (TpfTimeSpan.HasValue ? TpfTimeSpan.Value.GetHashCode() : 0);
         result = (result * 397) ^ BaseCredit.GetHashCode();
         result = (result * 397) ^ CreditEstimate.GetHashCode();
         result = (result * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         return(result);
     }
 }