mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
29 lines
714 B
C#
29 lines
714 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Reflection;
|
|
|
|
namespace Cosmos.IL2CPU
|
|
{
|
|
public class MethodBaseComparer : IComparer<MethodBase>, IEqualityComparer<MethodBase>
|
|
{
|
|
#region IComparer<MethodBase> Members
|
|
public int Compare(MethodBase x, MethodBase y)
|
|
{
|
|
return x.GetFullName().CompareTo(y.GetFullName());
|
|
}
|
|
#endregion
|
|
|
|
public bool Equals(MethodBase x, MethodBase y)
|
|
{
|
|
return Compare(x, y) == 0;
|
|
}
|
|
|
|
public int GetHashCode(MethodBase obj)
|
|
{
|
|
return obj.GetFullName().GetHashCode();
|
|
}
|
|
}
|
|
|
|
}
|