Пример #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderFulfillmentShipmentDetails other &&
                   ((Recipient == null && other.Recipient == null) || (Recipient?.Equals(other.Recipient) == true)) &&
                   ((Carrier == null && other.Carrier == null) || (Carrier?.Equals(other.Carrier) == true)) &&
                   ((ShippingNote == null && other.ShippingNote == null) || (ShippingNote?.Equals(other.ShippingNote) == true)) &&
                   ((ShippingType == null && other.ShippingType == null) || (ShippingType?.Equals(other.ShippingType) == true)) &&
                   ((TrackingNumber == null && other.TrackingNumber == null) || (TrackingNumber?.Equals(other.TrackingNumber) == true)) &&
                   ((TrackingUrl == null && other.TrackingUrl == null) || (TrackingUrl?.Equals(other.TrackingUrl) == true)) &&
                   ((PlacedAt == null && other.PlacedAt == null) || (PlacedAt?.Equals(other.PlacedAt) == true)) &&
                   ((InProgressAt == null && other.InProgressAt == null) || (InProgressAt?.Equals(other.InProgressAt) == true)) &&
                   ((PackagedAt == null && other.PackagedAt == null) || (PackagedAt?.Equals(other.PackagedAt) == true)) &&
                   ((ExpectedShippedAt == null && other.ExpectedShippedAt == null) || (ExpectedShippedAt?.Equals(other.ExpectedShippedAt) == true)) &&
                   ((ShippedAt == null && other.ShippedAt == null) || (ShippedAt?.Equals(other.ShippedAt) == true)) &&
                   ((CanceledAt == null && other.CanceledAt == null) || (CanceledAt?.Equals(other.CanceledAt) == true)) &&
                   ((CancelReason == null && other.CancelReason == null) || (CancelReason?.Equals(other.CancelReason) == true)) &&
                   ((FailedAt == null && other.FailedAt == null) || (FailedAt?.Equals(other.FailedAt) == true)) &&
                   ((FailureReason == null && other.FailureReason == null) || (FailureReason?.Equals(other.FailureReason) == true)));
        }
Пример #2
0
 public bool Equals(MongoFailedJobInfoDoc other)
 {
     return
         FailedAt.Equals(other.FailedAt) &&
         ExceptionMessage == other.ExceptionMessage &&
         StackTrace == other.StackTrace &&
         InnerException == other.InnerException;
 }
Пример #3
0
 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));
 }