/// <summary> /// Returns true if Request instances are equal /// </summary> /// <param name="input">Instance of Request to be compared</param> /// <returns>Boolean</returns> public bool Equals(Request input) { if (input == null) { return(false); } return (( Vehicles == input.Vehicles || Vehicles != null && Vehicles.SequenceEqual(input.Vehicles) ) && ( VehicleTypes == input.VehicleTypes || VehicleTypes != null && VehicleTypes.SequenceEqual(input.VehicleTypes) ) && ( Services == input.Services || Services != null && Services.SequenceEqual(input.Services) ) && ( Shipments == input.Shipments || Shipments != null && Shipments.SequenceEqual(input.Shipments) ) && ( Relations == input.Relations || Relations != null && Relations.SequenceEqual(input.Relations) ) && ( Algorithm == input.Algorithm || (Algorithm != null && Algorithm.Equals(input.Algorithm)) ) && ( Objectives == input.Objectives || Objectives != null && Objectives.SequenceEqual(input.Objectives) ) && ( CostMatrices == input.CostMatrices || CostMatrices != null && CostMatrices.SequenceEqual(input.CostMatrices) ) && ( Configuration == input.Configuration || (Configuration != null && Configuration.Equals(input.Configuration)) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Vehicles != null) { hashCode = hashCode * 59 + Vehicles.GetHashCode(); } if (VehicleTypes != null) { hashCode = hashCode * 59 + VehicleTypes.GetHashCode(); } if (Services != null) { hashCode = hashCode * 59 + Services.GetHashCode(); } if (Shipments != null) { hashCode = hashCode * 59 + Shipments.GetHashCode(); } if (Relations != null) { hashCode = hashCode * 59 + Relations.GetHashCode(); } if (Algorithm != null) { hashCode = hashCode * 59 + Algorithm.GetHashCode(); } if (Objectives != null) { hashCode = hashCode * 59 + Objectives.GetHashCode(); } if (CostMatrices != null) { hashCode = hashCode * 59 + CostMatrices.GetHashCode(); } if (Configuration != null) { hashCode = hashCode * 59 + Configuration.GetHashCode(); } return(hashCode); } }