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))); }
public TrackingCode(string code, Carrier carrier) { Code = code; Carrier = carrier; if (String.IsNullOrEmpty(code)) { AddNotification("code", "É necessário que tenha um código de rastreio"); } if (carrier.Equals(null)) { AddNotification("carrier", "A transportadora está vazia"); } }
public int CompareTo(Metrics other) { if (!(OS == null && other.OS == null)) { if (OS == null) { return(-1); } if (other.OS == null) { return(1); } if (!OS.Equals(other.OS)) { return(OS.CompareTo(other.OS)); } } if (!(OSVersion == null && other.OSVersion == null)) { if (OSVersion == null) { return(-1); } if (other.OSVersion == null) { return(1); } if (!OSVersion.Equals(other.OSVersion)) { return(OSVersion.CompareTo(other.OSVersion)); } } if (!(Device == null && other.Device == null)) { if (Device == null) { return(-1); } if (other.Device == null) { return(1); } if (!Device.Equals(other.Device)) { return(Device.CompareTo(other.Device)); } } if (!(Resolution == null && other.Resolution == null)) { if (Resolution == null) { return(-1); } if (other.Resolution == null) { return(1); } if (!Resolution.Equals(other.Resolution)) { return(Resolution.CompareTo(other.Resolution)); } } if (!(Carrier == null && other.Carrier == null)) { if (Carrier == null) { return(-1); } if (other.Carrier == null) { return(1); } if (!Carrier.Equals(other.Carrier)) { return(Carrier.CompareTo(other.Carrier)); } } if (!(AppVersion == null && other.AppVersion == null)) { if (AppVersion == null) { return(-1); } if (other.AppVersion == null) { return(1); } if (!AppVersion.Equals(other.AppVersion)) { return(AppVersion.CompareTo(other.AppVersion)); } } return(0); }