kreta/Kreta.WebApi/Ellenorzo/Kreta.Ellenorzo.Domain/VN/Intezmeny/IntezmenyResponse.cs
2024-03-13 00:33:46 +01:00

33 lines
1.2 KiB
C#

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<IntezmenyResponse>
{
public IntezmenyAdatok IntezmenyAdatok { get; set; }
public HashSet<RendszermodulListResponse> 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
}
};
}
}