using System;

namespace skyscraper5.Skyscraper.Equipment
{
	public class LnbType : BaseEquipment
	{
		public LnbType() { }

		public LnbType(string name, int lof1, int lof2, int lofSw, int minFreq, int maxFreq)
		{
			this.Name = name;
			this.Lof1 = lof1;
			this.Lof2 = lof2;
			this.LofSw = lofSw;
			this.MinimumFrequency = minFreq;
			this.MaximumFrequency = maxFreq;
		}

		public int Lof1 { get; set; }
		public int Lof2 { get; set; }
		public int LofSw { get; set; }

		public int MinimumFrequency { get; set; }
		public int MaximumFrequency { get; set; }

		protected bool Equals(LnbType 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((LnbType)obj);
		}

		public override int GetHashCode()
		{
			return HashCode.Combine(Lof1, Lof2, LofSw, MinimumFrequency, MaximumFrequency);
		}

		public override string ToString()
		{
			return Name;
		}
	}
}
