///<summary> /// Determines whether the specified <see cref="VProductModelCatalogDescriptionBase"/> instances are considered equal. ///</summary> ///<param name="Object1">The first <see cref="VProductModelCatalogDescriptionBase"/> to compare.</param> ///<param name="Object2">The second <see cref="VProductModelCatalogDescriptionBase"/> 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(VProductModelCatalogDescriptionBase Object1, VProductModelCatalogDescriptionBase 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.Summary != null && Object2.Summary != null ) { if (Object1.Summary != Object2.Summary) equal = false; } else if (Object1.Summary == null ^ Object1.Summary == null ) { equal = false; } if (Object1.Manufacturer != null && Object2.Manufacturer != null ) { if (Object1.Manufacturer != Object2.Manufacturer) equal = false; } else if (Object1.Manufacturer == null ^ Object1.Manufacturer == null ) { equal = false; } if (Object1.Copyright != null && Object2.Copyright != null ) { if (Object1.Copyright != Object2.Copyright) equal = false; } else if (Object1.Copyright == null ^ Object1.Copyright == null ) { equal = false; } if (Object1.ProductUrl != null && Object2.ProductUrl != null ) { if (Object1.ProductUrl != Object2.ProductUrl) equal = false; } else if (Object1.ProductUrl == null ^ Object1.ProductUrl == null ) { equal = false; } if (Object1.WarrantyPeriod != null && Object2.WarrantyPeriod != null ) { if (Object1.WarrantyPeriod != Object2.WarrantyPeriod) equal = false; } else if (Object1.WarrantyPeriod == null ^ Object1.WarrantyPeriod == null ) { equal = false; } if (Object1.WarrantyDescription != null && Object2.WarrantyDescription != null ) { if (Object1.WarrantyDescription != Object2.WarrantyDescription) equal = false; } else if (Object1.WarrantyDescription == null ^ Object1.WarrantyDescription == null ) { equal = false; } if (Object1.NoOfYears != null && Object2.NoOfYears != null ) { if (Object1.NoOfYears != Object2.NoOfYears) equal = false; } else if (Object1.NoOfYears == null ^ Object1.NoOfYears == null ) { equal = false; } if (Object1.MaintenanceDescription != null && Object2.MaintenanceDescription != null ) { if (Object1.MaintenanceDescription != Object2.MaintenanceDescription) equal = false; } else if (Object1.MaintenanceDescription == null ^ Object1.MaintenanceDescription == null ) { equal = false; } if (Object1.Wheel != null && Object2.Wheel != null ) { if (Object1.Wheel != Object2.Wheel) equal = false; } else if (Object1.Wheel == null ^ Object1.Wheel == null ) { equal = false; } if (Object1.Saddle != null && Object2.Saddle != null ) { if (Object1.Saddle != Object2.Saddle) equal = false; } else if (Object1.Saddle == null ^ Object1.Saddle == null ) { equal = false; } if (Object1.Pedal != null && Object2.Pedal != null ) { if (Object1.Pedal != Object2.Pedal) equal = false; } else if (Object1.Pedal == null ^ Object1.Pedal == null ) { equal = false; } if (Object1.BikeFrame != null && Object2.BikeFrame != null ) { if (Object1.BikeFrame != Object2.BikeFrame) equal = false; } else if (Object1.BikeFrame == null ^ Object1.BikeFrame == null ) { equal = false; } if (Object1.Crankset != null && Object2.Crankset != null ) { if (Object1.Crankset != Object2.Crankset) equal = false; } else if (Object1.Crankset == null ^ Object1.Crankset == null ) { equal = false; } if (Object1.PictureAngle != null && Object2.PictureAngle != null ) { if (Object1.PictureAngle != Object2.PictureAngle) equal = false; } else if (Object1.PictureAngle == null ^ Object1.PictureAngle == null ) { equal = false; } if (Object1.PictureSize != null && Object2.PictureSize != null ) { if (Object1.PictureSize != Object2.PictureSize) equal = false; } else if (Object1.PictureSize == null ^ Object1.PictureSize == null ) { equal = false; } if (Object1.ProductPhotoId != null && Object2.ProductPhotoId != null ) { if (Object1.ProductPhotoId != Object2.ProductPhotoId) equal = false; } else if (Object1.ProductPhotoId == null ^ Object1.ProductPhotoId == null ) { equal = false; } if (Object1.Material != null && Object2.Material != null ) { if (Object1.Material != Object2.Material) equal = false; } else if (Object1.Material == null ^ Object1.Material == null ) { equal = false; } if (Object1.Color != null && Object2.Color != null ) { if (Object1.Color != Object2.Color) equal = false; } else if (Object1.Color == null ^ Object1.Color == null ) { equal = false; } if (Object1.ProductLine != null && Object2.ProductLine != null ) { if (Object1.ProductLine != Object2.ProductLine) equal = false; } else if (Object1.ProductLine == null ^ Object1.ProductLine == null ) { equal = false; } if (Object1.Style != null && Object2.Style != null ) { if (Object1.Style != Object2.Style) equal = false; } else if (Object1.Style == null ^ Object1.Style == null ) { equal = false; } if (Object1.RiderExperience != null && Object2.RiderExperience != null ) { if (Object1.RiderExperience != Object2.RiderExperience) equal = false; } else if (Object1.RiderExperience == null ^ Object1.RiderExperience == 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="VProductModelCatalogDescriptionBase"/> and has the same value as this instance; otherwise, false.</returns> public virtual bool Equals(VProductModelCatalogDescriptionBase toObject) { if (toObject == null) return false; return Equals(this, toObject); }