Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

View File

@@ -0,0 +1,60 @@
#region Header
// _,-'/-'/
// . __,-; ,'( '/
// \. `-.__`-._`:_,-._ _ , . ``
// `:-._,------' ` _,`--` -: `_ , ` ,' :
// `---..__,,--' (C) 2023 ` -'. -'
// # Vita-Nex [http://core.vita-nex.com] #
// {o)xxx|===============- # -===============|xxx(o}
// # #
#endregion
#region References
using System;
using System.Collections.Generic;
using System.Linq;
#endregion
namespace VitaNex.Collections
{
public sealed class GenericComparer<T> : Comparer<T>
where T : IComparable<T>
{
private static readonly GenericComparer<T> _Instance = new GenericComparer<T>();
public static IOrderedEnumerable<T> Order(IEnumerable<T> source)
{
return source.Ensure().OrderBy(o => o, _Instance);
}
public static IOrderedEnumerable<T> OrderDescending(IEnumerable<T> source)
{
return source.Ensure().OrderBy(o => o, _Instance);
}
public static int Compute(T x, T y)
{
return _Instance.Compare(x, y);
}
public override int Compare(T x, T y)
{
if (ReferenceEquals(x, y))
{
return 0;
}
if (ReferenceEquals(x, null))
{
return 1;
}
if (ReferenceEquals(y, null))
{
return -1;
}
return x.CompareTo(y);
}
}
}