using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Edge.Core.Configuration { public class NozzleExtraInfoConfiguration { public List Mapping { get; set; } public override bool Equals(object obj) { if (obj == null) return false; if (!(obj is NozzleExtraInfoConfiguration target)) return false; else { if (this.Mapping.Count != target.Mapping.Count) return false; for (int i = 0; i < this.Mapping.Count; i++) if (!this.Mapping[i].Equals(target.Mapping[i])) return false; return true; } } } /// /// For holding extra data binding to a nozzle. /// public class NozzleExtraInfo { public int PumpId { get; set; } public int? SiteLevelNozzleId { get; set; } public int? TankNumber { get; set; } public int NozzleLogicalId { get; set; } public int ProductBarcode { get; set; } public string ProductName { get; set; } public string Description { get; set; } public override bool Equals(object obj) { if (obj == null) return false; if (!(obj is NozzleExtraInfo target)) return false; else { if (this.PumpId != target.PumpId || this.SiteLevelNozzleId != target.SiteLevelNozzleId || this.TankNumber != target.TankNumber || this.NozzleLogicalId != target.NozzleLogicalId || this.ProductBarcode != target.ProductBarcode) return false; return true; } } } }