using static CMS_CORE_Library.DataStructures; namespace Step.Model.DTOModels { public class DTOPowerOnDataModel { public PrePowerOnModel PrePowerOn { get; set; } public PostPowerOnModel PostPowerOn { get; set; } public AxisResetDataModel AxisReset; public DTOPowerOnDataModel() { PrePowerOn = new PrePowerOnModel(); PostPowerOn = new PostPowerOnModel(); AxisReset = new AxisResetDataModel(); } public override bool Equals(object obj) { var item = obj as DTOPowerOnDataModel; // Object is not a DTOPowerOnDataModel instance if (item == null) return false; // If one field is different, objects are different if (!PrePowerOn.Equals(item.PrePowerOn) || !PostPowerOn.Equals(item.PostPowerOn) || !AxisReset.Equals(item.AxisReset)) return false; return true; } public override int GetHashCode() { return base.GetHashCode(); } } }