118 lines
4.8 KiB
C#
118 lines
4.8 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Collections.Generic
|
|
{
|
|
/// <summary>Provides a base class for implementations of the <see cref="T:System.Collections.Generic.IComparer`1" /> generic interface.</summary>
|
|
/// <typeparam name="T">The type of objects to compare.</typeparam>
|
|
// Token: 0x020005F9 RID: 1529
|
|
[Token(Token = "0x20005F9")]
|
|
[TypeDependency("System.Collections.Generic.ObjectComparer`1")]
|
|
[Serializable]
|
|
public abstract class Comparer<T> : IComparer, IComparer<T>
|
|
{
|
|
/// <summary>Returns a default sort order comparer for the type specified by the generic argument.</summary>
|
|
/// <returns>An object that inherits <see cref="T:System.Collections.Generic.Comparer`1" /> and serves as a sort order comparer for type <paramref name="T" />.</returns>
|
|
// Token: 0x1700074E RID: 1870
|
|
// (get) Token: 0x06002EA5 RID: 11941 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x1700074E")]
|
|
public static Comparer<T> Default
|
|
{
|
|
[Token(Token = "0x6002EA5")]
|
|
[Address(RVA = "0x2332230", Offset = "0x2331030", VA = "0x182332230")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Creates a comparer by using the specified comparison.</summary>
|
|
/// <param name="comparison">The comparison to use.</param>
|
|
/// <returns>The new comparer.</returns>
|
|
// Token: 0x06002EA6 RID: 11942 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002EA6")]
|
|
[Address(RVA = "0x31CA260", Offset = "0x31C9060", VA = "0x1831CA260")]
|
|
public static Comparer<T> Create(Comparison<T> comparison)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06002EA7 RID: 11943 RVA: 0x00002082 File Offset: 0x00000282
|
|
[Token(Token = "0x6002EA7")]
|
|
[Address(RVA = "0x353CA80", Offset = "0x353B880", VA = "0x18353CA80")]
|
|
private static Comparer<T> CreateComparer()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>When overridden in a derived class, performs a comparison of two objects of the same type and returns a value indicating whether one object is less than, equal to, or greater than the other.</summary>
|
|
/// <param name="x">The first object to compare.</param>
|
|
/// <param name="y">The second object to compare.</param>
|
|
/// <returns>A signed integer that indicates the relative values of <paramref name="x" /> and <paramref name="y" />, as shown in the following table.
|
|
/// Value
|
|
///
|
|
/// Meaning
|
|
///
|
|
/// Less than zero
|
|
///
|
|
/// <paramref name="x" /> is less than <paramref name="y" />.
|
|
///
|
|
/// Zero
|
|
///
|
|
/// <paramref name="x" /> equals <paramref name="y" />.
|
|
///
|
|
/// Greater than zero
|
|
///
|
|
/// <paramref name="x" /> is greater than <paramref name="y" />.</returns>
|
|
/// <exception cref="T:System.ArgumentException">Type <paramref name="T" /> does not implement either the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface.</exception>
|
|
// Token: 0x06002EA8 RID: 11944
|
|
[Token(Token = "0x6002EA8")]
|
|
[Address(Slot = "6")]
|
|
public abstract int Compare(T x, T y);
|
|
|
|
/// <summary>Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.</summary>
|
|
/// <param name="x">The first object to compare.</param>
|
|
/// <param name="y">The second object to compare.</param>
|
|
/// <returns>A signed integer that indicates the relative values of <paramref name="x" /> and <paramref name="y" />, as shown in the following table.
|
|
/// Value
|
|
///
|
|
/// Meaning
|
|
///
|
|
/// Less than zero
|
|
///
|
|
/// <paramref name="x" /> is less than <paramref name="y" />.
|
|
///
|
|
/// Zero
|
|
///
|
|
/// <paramref name="x" /> equals <paramref name="y" />.
|
|
///
|
|
/// Greater than zero
|
|
///
|
|
/// <paramref name="x" /> is greater than <paramref name="y" />.</returns>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="x" /> or <paramref name="y" /> is of a type that cannot be cast to type <paramref name="T" />.
|
|
/// -or-
|
|
/// <paramref name="x" /> and <paramref name="y" /> do not implement either the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface.</exception>
|
|
// Token: 0x06002EA9 RID: 11945 RVA: 0x00018510 File Offset: 0x00016710
|
|
[Token(Token = "0x6002EA9")]
|
|
[Address(RVA = "0x2330260", Offset = "0x232F060", VA = "0x182330260", Slot = "4")]
|
|
int IComparer.Compare(object x, object y)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Comparer`1" /> class.</summary>
|
|
// Token: 0x06002EAA RID: 11946 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6002EAA")]
|
|
[Address(RVA = "0x118F5A0", Offset = "0x118E3A0", VA = "0x18118F5A0")]
|
|
protected Comparer()
|
|
{
|
|
}
|
|
|
|
// Token: 0x04001A4A RID: 6730
|
|
[Token(Token = "0x4001A4A")]
|
|
private static Comparer<T> defaultComparer;
|
|
}
|
|
}
|