Files
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

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: 0x02000619 RID: 1561
[Token(Token = "0x2000619")]
[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: 0x170007C6 RID: 1990
// (get) Token: 0x060030BD RID: 12477 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x170007C6")]
public static Comparer<T> Default
{
[Token(Token = "0x60030BD")]
[Address(RVA = "0x2274810", Offset = "0x2273810", VA = "0x182274810")]
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: 0x060030BE RID: 12478 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60030BE")]
[Address(RVA = "0x3450540", Offset = "0x344F540", VA = "0x183450540")]
public static Comparer<T> Create(Comparison<T> comparison)
{
return null;
}
// Token: 0x060030BF RID: 12479 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x60030BF")]
[Address(RVA = "0x35E1BA0", Offset = "0x35E0BA0", VA = "0x1835E1BA0")]
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: 0x060030C0 RID: 12480
[Token(Token = "0x60030C0")]
[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: 0x060030C1 RID: 12481 RVA: 0x0001A940 File Offset: 0x00018B40
[Token(Token = "0x60030C1")]
[Address(RVA = "0x2273C20", Offset = "0x2272C20", VA = "0x182273C20", 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: 0x060030C2 RID: 12482 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x60030C2")]
[Address(RVA = "0x1CC5E40", Offset = "0x1CC4E40", VA = "0x181CC5E40")]
protected Comparer()
{
}
// Token: 0x04001B0D RID: 6925
[Token(Token = "0x4001B0D")]
private static Comparer<T> defaultComparer;
}
}