Files
BeWoPlaner/BeWoPlanerMobil/Models/MokSupportConceptListObject.cs
2025-07-15 14:26:03 +02:00

67 lines
2.2 KiB
C#

using BS.Shared.DataContracts.Compact;
using BS.Shared.DataContracts.Invoicing;
using System;
using System.Runtime.Serialization;
using System.Windows.Media;
namespace BeWoPlanerMobil.Models
{
[Serializable]
public class MokSupportConceptListObject
{
public string NameAndDateOfBirth { get; set; }
public string SupportConceptTimeSpan { get; set; }
public long SupportConceptOid { get; }
public long CostBearer2SupportConceptOid { get; }
public string CostBearer2SupportConceptOidName { get; }
public bool IsAboutToExpire { get; }
public bool ExpiresInThreeMonthsOrLess { get; }
public MokSupportConceptListObject(long supportConceptOid, long costBearer2SupportConceptOid, bool isAboutToExpire, bool expiresIn3MonthOrLess)
{
SupportConceptOid = supportConceptOid;
CostBearer2SupportConceptOid = costBearer2SupportConceptOid;
CostBearer2SupportConceptOidName = String.Format("OidHolder_{0}", CostBearer2SupportConceptOid);
IsAboutToExpire = isAboutToExpire;
ExpiresInThreeMonthsOrLess = expiresIn3MonthOrLess;
}
public override bool Equals(object obj)
{
if (!(obj is MokSupportConceptListObject))
{
return false;
}
var obj2 = (MokSupportConceptListObject)obj;
return Equals(CostBearer2SupportConceptOid, obj2.CostBearer2SupportConceptOid);
}
public override int GetHashCode()
{
unchecked
{
const int hashingBase = (int)2166136261;
const int hashingMultiplier = 16777619;
var hash = hashingBase;
hash = (hash * hashingMultiplier) ^ (NameAndDateOfBirth?.GetHashCode() ?? 0);
hash = (hash * hashingMultiplier) ^ (SupportConceptTimeSpan?.GetHashCode() ?? 0);
hash = (hash * hashingMultiplier) ^ (CostBearer2SupportConceptOid.GetHashCode());
hash = (hash * hashingMultiplier) ^ IsAboutToExpire.GetHashCode();
hash = (hash * hashingMultiplier) ^ ExpiresInThreeMonthsOrLess.GetHashCode();
return hash;
}
}
}
}