41 lines
1.1 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|