///<summary> /// Returns a value indicating whether this instance is equal to a specified object. ///</summary> ///<param name="toObject">An object to compare to this instance.</param> ///<returns>true if toObject is a <see cref="VProductModelInstructionsBase"/> and has the same value as this instance; otherwise, false.</returns> public virtual bool Equals(VProductModelInstructionsBase toObject) { if (toObject == null) { return(false); } return(Equals(this, toObject)); }
///<summary> /// Determines whether the specified <see cref="VProductModelInstructionsBase"/> instances are considered equal. ///</summary> ///<param name="Object1">The first <see cref="VProductModelInstructionsBase"/> to compare.</param> ///<param name="Object2">The second <see cref="VProductModelInstructionsBase"/> to compare. </param> ///<returns>true if Object1 is the same instance as Object2 or if both are null references or if objA.Equals(objB) returns true; otherwise, false.</returns> public static bool Equals(VProductModelInstructionsBase Object1, VProductModelInstructionsBase Object2) { // both are null if (Object1 == null && Object2 == null) { return(true); } // one or the other is null, but not both if (Object1 == null ^ Object2 == null) { return(false); } bool equal = true; if (Object1.ProductModelId != Object2.ProductModelId) { equal = false; } if (Object1.Name != Object2.Name) { equal = false; } if (Object1.Instructions != null && Object2.Instructions != null) { if (Object1.Instructions != Object2.Instructions) { equal = false; } } else if (Object1.Instructions == null ^ Object1.Instructions == null) { equal = false; } if (Object1.LocationId != null && Object2.LocationId != null) { if (Object1.LocationId != Object2.LocationId) { equal = false; } } else if (Object1.LocationId == null ^ Object1.LocationId == null) { equal = false; } if (Object1.SetupHours != null && Object2.SetupHours != null) { if (Object1.SetupHours != Object2.SetupHours) { equal = false; } } else if (Object1.SetupHours == null ^ Object1.SetupHours == null) { equal = false; } if (Object1.MachineHours != null && Object2.MachineHours != null) { if (Object1.MachineHours != Object2.MachineHours) { equal = false; } } else if (Object1.MachineHours == null ^ Object1.MachineHours == null) { equal = false; } if (Object1.LaborHours != null && Object2.LaborHours != null) { if (Object1.LaborHours != Object2.LaborHours) { equal = false; } } else if (Object1.LaborHours == null ^ Object1.LaborHours == null) { equal = false; } if (Object1.LotSize != null && Object2.LotSize != null) { if (Object1.LotSize != Object2.LotSize) { equal = false; } } else if (Object1.LotSize == null ^ Object1.LotSize == null) { equal = false; } if (Object1.Step != null && Object2.Step != null) { if (Object1.Step != Object2.Step) { equal = false; } } else if (Object1.Step == null ^ Object1.Step == null) { equal = false; } if (Object1.Rowguid != Object2.Rowguid) { equal = false; } if (Object1.ModifiedDate != Object2.ModifiedDate) { equal = false; } return(equal); }
///<summary> /// Determines whether the specified <see cref="VProductModelInstructionsBase"/> instances are considered equal. ///</summary> ///<param name="Object1">The first <see cref="VProductModelInstructionsBase"/> to compare.</param> ///<param name="Object2">The second <see cref="VProductModelInstructionsBase"/> to compare. </param> ///<returns>true if Object1 is the same instance as Object2 or if both are null references or if objA.Equals(objB) returns true; otherwise, false.</returns> public static bool Equals(VProductModelInstructionsBase Object1, VProductModelInstructionsBase Object2) { // both are null if (Object1 == null && Object2 == null) return true; // one or the other is null, but not both if (Object1 == null ^ Object2 == null) return false; bool equal = true; if (Object1.ProductModelId != Object2.ProductModelId) equal = false; if (Object1.Name != Object2.Name) equal = false; if (Object1.Instructions != null && Object2.Instructions != null ) { if (Object1.Instructions != Object2.Instructions) equal = false; } else if (Object1.Instructions == null ^ Object1.Instructions == null ) { equal = false; } if (Object1.LocationId != null && Object2.LocationId != null ) { if (Object1.LocationId != Object2.LocationId) equal = false; } else if (Object1.LocationId == null ^ Object1.LocationId == null ) { equal = false; } if (Object1.SetupHours != null && Object2.SetupHours != null ) { if (Object1.SetupHours != Object2.SetupHours) equal = false; } else if (Object1.SetupHours == null ^ Object1.SetupHours == null ) { equal = false; } if (Object1.MachineHours != null && Object2.MachineHours != null ) { if (Object1.MachineHours != Object2.MachineHours) equal = false; } else if (Object1.MachineHours == null ^ Object1.MachineHours == null ) { equal = false; } if (Object1.LaborHours != null && Object2.LaborHours != null ) { if (Object1.LaborHours != Object2.LaborHours) equal = false; } else if (Object1.LaborHours == null ^ Object1.LaborHours == null ) { equal = false; } if (Object1.LotSize != null && Object2.LotSize != null ) { if (Object1.LotSize != Object2.LotSize) equal = false; } else if (Object1.LotSize == null ^ Object1.LotSize == null ) { equal = false; } if (Object1.Step != null && Object2.Step != null ) { if (Object1.Step != Object2.Step) equal = false; } else if (Object1.Step == null ^ Object1.Step == null ) { equal = false; } if (Object1.Rowguid != Object2.Rowguid) equal = false; if (Object1.ModifiedDate != Object2.ModifiedDate) equal = false; return equal; }
///<summary> /// Returns a value indicating whether this instance is equal to a specified object. ///</summary> ///<param name="toObject">An object to compare to this instance.</param> ///<returns>true if toObject is a <see cref="VProductModelInstructionsBase"/> and has the same value as this instance; otherwise, false.</returns> public virtual bool Equals(VProductModelInstructionsBase toObject) { if (toObject == null) return false; return Equals(this, toObject); }