60 lines
1.4 KiB
C#
60 lines
1.4 KiB
C#
using System;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace skyscraper5.Skyscraper.Equipment
|
|
{
|
|
public class LnbEntity : BaseEquipment
|
|
{
|
|
public LnbEntity() { }
|
|
|
|
public LnbEntity(string manufac, string name, int lof1, int lof2, int lofSw, int minFreq, int maxFreq)
|
|
{
|
|
this.Manufacturer = manufac;
|
|
this.Name = name;
|
|
this.Lof1 = lof1;
|
|
this.Lof2 = lof2;
|
|
this.LofSw = lofSw;
|
|
this.MinimumFrequency = minFreq;
|
|
this.MaximumFrequency = maxFreq;
|
|
}
|
|
|
|
[XmlAttribute]
|
|
public int Lof1 { get; set; }
|
|
|
|
[XmlAttribute]
|
|
public int Lof2 { get; set; }
|
|
|
|
[XmlAttribute]
|
|
public int LofSw { get; set; }
|
|
|
|
[XmlAttribute]
|
|
public int MinimumFrequency { get; set; }
|
|
|
|
[XmlAttribute]
|
|
public int MaximumFrequency { get; set; }
|
|
|
|
protected bool Equals(LnbEntity other)
|
|
{
|
|
return Lof1 == other.Lof1 && Lof2 == other.Lof2 && LofSw == other.LofSw && MinimumFrequency == other.MinimumFrequency && MaximumFrequency == other.MaximumFrequency;
|
|
}
|
|
|
|
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((LnbEntity)obj);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return HashCode.Combine(Lof1, Lof2, LofSw, MinimumFrequency, MaximumFrequency);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return String.Format("{0} {1}", Manufacturer, Name);
|
|
}
|
|
}
|
|
}
|