-
This commit is contained in:
stax76
2017-08-27 09:37:27 +02:00
parent 48b7aa9136
commit 720cd40579
26 changed files with 7204 additions and 0 deletions

17
mpvnet/Misc.cs Normal file
View File

@@ -0,0 +1,17 @@
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace mpvnet
{
public class StringLogicalComparer : IComparer, IComparer<string>
{
[DllImport("shlwapi.dll", CharSet = CharSet.Unicode)]
public static extern int StrCmpLogical(string x, string y);
int IComparer_Compare(object x, object y) => StrCmpLogical(x.ToString(), y.ToString());
int IComparer.Compare(object x, object y) => IComparer_Compare(x, y);
int IComparerOfString_Compare(string x, string y) => StrCmpLogical(x, y);
int IComparer<string>.Compare(string x, string y) => IComparerOfString_Compare(x, y);
}
}