Files
cms_thermo_active/Step.Model/DTOModels/DTOProcessDataModel.cs
T
Lucio Maranta 6332ed9732 First softkey implementation
Added config and API
Added Thread and signal
2018-03-06 17:58:02 +01:00

44 lines
1.2 KiB
C#

using System.Collections.Generic;
using System.Linq;
using static CMS_CORE_Library.DataStructures;
namespace Step.Model.DTOModels
{
public class DTOProcessDataModel
{
public bool isRunning;
public bool selectedProcess;
public List<ProcessDataModel> processes;
public DTOProcessDataModel()
{
isRunning = false;
processes = new List<ProcessDataModel>();
}
public override bool Equals(object obj)
{
var item = obj as DTOProcessDataModel;
// Object is not a DTOProcessDataModel instance
if (item == null)
return false;
if (isRunning != item.isRunning)
return false;
// If the numbers of the list's elemets are different, lists are different
if (item.processes.Count != processes.Count)
return false;
// Check list's elements
bool listAreEquals = item.processes.All(processes.Contains);
if (!listAreEquals)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}