Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | On Mono, it appears that custom comparers used with the Dictionary<TKey,TValue> class must implement the IComparer<T> interface. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
46f51266d5398223432a783a70e06646 |
User & Date: | mistachkin 2016-03-24 01:36:17 |
Context
2016-03-24
| ||
01:49 | Missed one place where 'UnsafeNativeMethods.settingReadCounts' needed to be changed to 'DebugData.settingReadCounts'. check-in: d592edf5e4 user: mistachkin tags: trunk | |
01:36 | On Mono, it appears that custom comparers used with the Dictionary<TKey,TValue> class must implement the IComparer<T> interface. check-in: 46f51266d5 user: mistachkin tags: trunk | |
01:30 | Make the test for ticket [393d954be0] portable to Mono. check-in: 0ba5e9043b user: mistachkin tags: trunk | |
Changes
Changes to System.Data.SQLite/SQLiteConvert.cs.
2882 2882 } 2883 2883 2884 2884 internal string typeName; 2885 2885 internal DbType dataType; 2886 2886 internal bool primary; 2887 2887 } 2888 2888 2889 - internal sealed class TypeNameStringComparer : IEqualityComparer<string> 2889 + internal sealed class TypeNameStringComparer : IEqualityComparer<string>, IComparer<string> 2890 2890 { 2891 2891 #region IEqualityComparer<string> Members 2892 2892 public bool Equals( 2893 2893 string left, 2894 2894 string right 2895 2895 ) 2896 2896 { ................................................................................ 2915 2915 #else 2916 2916 return value.ToLower().GetHashCode(); 2917 2917 #endif 2918 2918 else 2919 2919 throw new ArgumentNullException("value"); 2920 2920 } 2921 2921 #endregion 2922 + 2923 + /////////////////////////////////////////////////////////////////////////// 2924 + 2925 + #region IComparer<string> Members 2926 + public int Compare( 2927 + string x, 2928 + string y 2929 + ) 2930 + { 2931 + if ((x == null) && (y == null)) 2932 + return 0; 2933 + else if (x == null) 2934 + return -1; 2935 + else if (y == null) 2936 + return 1; 2937 + else 2938 + return x.CompareTo(y); 2939 + } 2940 + #endregion 2922 2941 } 2923 2942 }