forked from Hengle/TModel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sorters.cs
53 lines (49 loc) · 1.38 KB
/
Sorters.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using CUE4Parse.FileProvider;
using CUE4Parse.UE4.Vfs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TModel.Modules;
namespace TModel.Sorters
{
public class NameSort : IComparer<IAesVfsReader>,
#if !RELEASE
IComparer<DirectoryModule.AssetItem>,
IComparer<DirectoryModule.FolderItem>,
#endif
IComparer<GameFile>,
IComparer<GameContentItemPreview>
{
public int Compare(IAesVfsReader? x, IAesVfsReader? y)
{
return x.Name.CompareTo(y.Name);
}
#if !RELEASE
public int Compare(DirectoryModule.AssetItem? x, DirectoryModule.AssetItem? y)
{
return x.Name.CompareTo(y.Name);
}
public int Compare(DirectoryModule.FolderItem? x, DirectoryModule.FolderItem? y)
{
return x.Name.CompareTo(y.Name);
}
#endif
public int Compare(GameFile? x, GameFile? y)
{
return x.Name.CompareTo(y.Name);
}
public int Compare(GameContentItemPreview? x, GameContentItemPreview? y)
{
return x.File.Name.CompareTo(y.File.Name);
}
}
public class SizeSort : IComparer<IAesVfsReader>
{
public int Compare(IAesVfsReader? x, IAesVfsReader? y)
{
return x.FileCount.CompareTo(y.FileCount);
}
}
}