scripts
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace System
|
||||
{
|
||||
// Token: 0x020006A9 RID: 1705
|
||||
[Serializable]
|
||||
internal sealed class OrdinalComparer : StringComparer
|
||||
{
|
||||
// Token: 0x0600409D RID: 16541 RVA: 0x000DC060 File Offset: 0x000DA260
|
||||
public OrdinalComparer(bool ignoreCase)
|
||||
{
|
||||
this._ignoreCase = ignoreCase;
|
||||
}
|
||||
|
||||
// Token: 0x0600409E RID: 16542 RVA: 0x000DC070 File Offset: 0x000DA270
|
||||
public override int Compare(string x, string y)
|
||||
{
|
||||
if (this._ignoreCase)
|
||||
{
|
||||
return string.CompareOrdinalCaseInsensitiveUnchecked(x, 0, int.MaxValue, y, 0, int.MaxValue);
|
||||
}
|
||||
return string.CompareOrdinalUnchecked(x, 0, int.MaxValue, y, 0, int.MaxValue);
|
||||
}
|
||||
|
||||
// Token: 0x0600409F RID: 16543 RVA: 0x000DC0B0 File Offset: 0x000DA2B0
|
||||
public override bool Equals(string x, string y)
|
||||
{
|
||||
if (this._ignoreCase)
|
||||
{
|
||||
return this.Compare(x, y) == 0;
|
||||
}
|
||||
return x == y;
|
||||
}
|
||||
|
||||
// Token: 0x060040A0 RID: 16544 RVA: 0x000DC0D0 File Offset: 0x000DA2D0
|
||||
public override int GetHashCode(string s)
|
||||
{
|
||||
if (s == null)
|
||||
{
|
||||
throw new ArgumentNullException("s");
|
||||
}
|
||||
if (this._ignoreCase)
|
||||
{
|
||||
return s.GetCaseInsensitiveHashCode();
|
||||
}
|
||||
return s.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x040019AF RID: 6575
|
||||
private readonly bool _ignoreCase;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user