using System; using System.Collections.Generic; using Kreta.Ellenorzo.Domain.VN.Common; using Kreta.Ellenorzo.Domain.VN.Intezmeny.Rendszermodul; using Kreta.Ellenorzo.Domain.VN.Intezmeny.TestreszabasBeallitasok; namespace Kreta.Ellenorzo.Domain.VN.Intezmeny { [Serializable] public class IntezmenyResponse : IEqualityComparer { public IntezmenyAdatok IntezmenyAdatok { get; set; } public HashSet Rendszermodulok { get; set; } public TestreszabasBeallitasokResponse TestreszabasBeallitasok { get; set; } public bool Equals(IntezmenyResponse x, IntezmenyResponse y) => x.IntezmenyAdatok.Uid.Equals(x.IntezmenyAdatok.Uid, y.IntezmenyAdatok.Uid); public int GetHashCode(IntezmenyResponse obj) => obj.IntezmenyAdatok.Uid.UidRaw.GetHashCode(); public static explicit operator IntezmenyResponse(IntezmenyModel model) => model == null ? null : new IntezmenyResponse { IntezmenyAdatok = new IntezmenyAdatok { Uid = model.Uid, Azonosito = model.Azonosito, TeljesNev = model.TeljesNev } }; } }