using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace skyscraper5.src.Skyscraper.IO.PortableExecutables
{
	internal class PeSectionEqualityComparer : IEqualityComparer<PeSection>
	{
		public bool Equals(PeSection x, PeSection y)
		{
			if (x.virtualSize != y.virtualSize) 
				return false;
			if (x.sizeOfRawData != y.sizeOfRawData) 
				return false;
			if (x.virtualAddress != y.virtualAddress) 
				return false;
			if (!x.ToString().Equals(y.ToString())) 
				return false;
			return true;
		}

		public int GetHashCode([DisallowNull] PeSection obj)
		{
			return obj.GetHashCode();
		}
	}
}
