anx.framework/ANX.Framework.Content.Pipeline/ReferenceEqualityComparer.cs
Konstantin Koch cb01231e7d implemented Intermediate.Serializer namespace in Content Pipeline.
removed the old .tfignore file.
2015-03-29 18:16:03 +02:00

25 lines
627 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ANX.Framework.Content.Pipeline
{
/// <summary>
/// Makes sure that the custom GetHashCode method of the type to compare is ignored and absolutely compare only references.
/// </summary>
/// <typeparam name="T"></typeparam>
internal class ReferenceEqualityComparer<T> : IEqualityComparer<T>
{
public bool Equals(T x, T y)
{
return object.ReferenceEquals(x, y);
}
public int GetHashCode(T obj)
{
return obj.GetHashCode();
}
}
}