feyris-tan b50eb3b5e6
Some checks failed
🚀 Pack skyscraper8 / make-zip (push) Failing after 9s
Rewrote and decluttered TsPacket class.
2026-03-11 23:32:44 +01:00

41 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Skyscraper.Net;
namespace skyscraper5.Dvb.DataBroadcasting.IntModel
{
public class IpMacNotification
{
public IpMacNotification(Platform platform, Target target, Operational operational)
{
Platform = platform;
Target = target;
Operational = operational;
}
public Platform Platform { get; }
public Target Target { get; }
public Operational Operational { get; }
public static IEnumerable<IpMacNotification> FlatMap(Platform platform, Target target, Operational operational)
{
yield return new IpMacNotification(platform, target, operational);
}
public override bool Equals(object? obj)
{
return obj is IpMacNotification notification &&
EqualityComparer<Platform>.Default.Equals(Platform, notification.Platform) &&
EqualityComparer<Target>.Default.Equals(Target, notification.Target);
}
public override int GetHashCode()
{
return HashCode.Combine(Platform, Target);
}
}
}