public bool Equals(ScheduledJob other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Id == other.Id && Priority == other.Priority && Attempts == other.Attempts && string.Equals(LastError, other.LastError) && RunAt.Equals(other.RunAt) && SucceededAt.Equals(other.SucceededAt) && FailedAt.Equals(other.FailedAt) && LockedAt.Equals(other.LockedAt) && string.Equals(LockedBy, other.LockedBy) && CreatedAt.Equals(other.CreatedAt) && UpdatedAt.Equals(other.UpdatedAt)); }
public override int GetHashCode() { unchecked { var hashCode = Id; hashCode = (hashCode * 397) ^ Priority; hashCode = (hashCode * 397) ^ Attempts; hashCode = (hashCode * 397) ^ (LastError != null ? LastError.GetHashCode() : 0); hashCode = (hashCode * 397) ^ RunAt.GetHashCode(); hashCode = (hashCode * 397) ^ SucceededAt.GetHashCode(); hashCode = (hashCode * 397) ^ FailedAt.GetHashCode(); hashCode = (hashCode * 397) ^ LockedAt.GetHashCode(); hashCode = (hashCode * 397) ^ (LockedBy != null ? LockedBy.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CreatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ UpdatedAt.GetHashCode(); return(hashCode); } }