35 lines
912 B
C#
35 lines
912 B
C#
using System;
|
|
|
|
namespace skyscraper5.Skyscraper.Scraper.Storage.Utilities
|
|
{
|
|
public class DatabaseKeyTdt
|
|
{
|
|
public int CurrentNetworkId { get; }
|
|
public int CurrentTransportStreamId { get; }
|
|
|
|
public DatabaseKeyTdt(int currentNetworkId, int currentTransportStreamId)
|
|
{
|
|
CurrentNetworkId = currentNetworkId;
|
|
CurrentTransportStreamId = currentTransportStreamId;
|
|
}
|
|
|
|
protected bool Equals(DatabaseKeyTdt other)
|
|
{
|
|
return CurrentNetworkId == other.CurrentNetworkId && CurrentTransportStreamId == other.CurrentTransportStreamId;
|
|
}
|
|
|
|
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((DatabaseKeyTdt)obj);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return HashCode.Combine(CurrentNetworkId, CurrentTransportStreamId);
|
|
}
|
|
}
|
|
}
|