47 lines
1.0 KiB
C#
47 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace skyscraper8.T2MI
|
|
{
|
|
internal class T2MiSubSkyscraperIdentifier
|
|
{
|
|
public int Pid { get; }
|
|
public byte BasebandFramePlpId { get; }
|
|
|
|
public T2MiSubSkyscraperIdentifier(int pid, byte basebandFramePlpId)
|
|
{
|
|
Pid = pid;
|
|
BasebandFramePlpId = basebandFramePlpId;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return String.Format("PID{0:X4}_PLP{1}", Pid, BasebandFramePlpId);
|
|
}
|
|
|
|
protected bool Equals(T2MiSubSkyscraperIdentifier other)
|
|
{
|
|
return Pid == other.Pid && BasebandFramePlpId == other.BasebandFramePlpId;
|
|
}
|
|
|
|
public override bool Equals(object? obj)
|
|
{
|
|
if (ReferenceEquals(null, obj))
|
|
return false;
|
|
if (ReferenceEquals(this, obj))
|
|
return true;
|
|
if (obj.GetType() != this.GetType())
|
|
return false;
|
|
return Equals((T2MiSubSkyscraperIdentifier)obj);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return HashCode.Combine(Pid, BasebandFramePlpId);
|
|
}
|
|
}
|
|
}
|