added equals methods to base thermo object

This commit is contained in:
Samuele Locatelli
2020-05-30 11:42:27 +02:00
parent d6b5260db6
commit aed350dbe9
5 changed files with 321 additions and 349 deletions
-44
View File
@@ -1,44 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CMS_CORE_Library.Models
{
public class ThermoModels
{
/// <summary>
/// Represents thermo gauge data
/// </summary>
public class GaugeModel
{
public uint TimeAdv { get; set; } = 0;
public int Power { get; set; } = 0;
public int Vacuum { get; set; } = 0;
public int Air { get; set; } = 0;
public override bool Equals(object obj)
{
// Object is not a DTOProcessDataModel instance
if (!(obj is GaugeModel item))
return false;
if (TimeAdv != item.TimeAdv)
return false;
if (Power != item.Power)
return false;
if (Vacuum != item.Vacuum)
return false;
if (Air != item.Air)
return false;
return true;
}
}
}
}