﻿using System;

namespace SharpHaven.Resources
{
	public struct ResourceRef
	{
		public ResourceRef(string name, ushort version)
		{
			if (name == null)
				throw new ArgumentNullException(nameof(name));

			this.Name = name;
			this.Version = version;
		}

		public string Name { get; }

		public ushort Version { get; }

		public override int GetHashCode()
		{
			return Name.GetHashCode() ^ Version.GetHashCode();
		}

		public override bool Equals(object obj)
		{
			if (!(obj is ResourceRef))
				return false;
			var other = (ResourceRef)obj;
			return string.Equals(Name, other.Name) && Version == other.Version;
		}
	}
}

﻿using System;

namespace SharpHaven.Resources
{
	public struct ResourceRef
	{
		public ResourceRef(string name, ushort version)
		{
			if (name == null)
				throw new ArgumentNullException(nameof(name));

			Name = name;
			Version = version;
		}

		public string Name { get; }

		public ushort Version { get; }

		public override int GetHashCode()
		{
			return Name.GetHashCode() ^ Version.GetHashCode();
		}

		public override bool Equals(object obj)
		{
			if (!(obj is ResourceRef))
				return false;
			var other = (ResourceRef)obj;
			return string.Equals(Name, other.Name) && Version == other.Version;
		}
	}
}

Revert "Fix mono compilation error"
Revert "Fix mono compilation error"

This reverts commit be3d841e576a83354476c905b51882159daba5cc.
