System.Data.SQLite

Check-in [46f51266d5]
Login

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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 46f51266d5398223432a783a70e066463fdf0a37
User & Date: mistachkin 2016-03-24 01:36:17.706
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
Unified Diff Ignore Whitespace Patch
Changes to System.Data.SQLite/SQLiteConvert.cs.
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
    }

    internal string typeName;
    internal DbType dataType;
    internal bool primary;
  }

  internal sealed class TypeNameStringComparer : IEqualityComparer<string>
  {
    #region IEqualityComparer<string> Members
    public bool Equals(
      string left,
      string right
      )
    {







|







2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
    }

    internal string typeName;
    internal DbType dataType;
    internal bool primary;
  }

  internal sealed class TypeNameStringComparer : IEqualityComparer<string>, IComparer<string>
  {
    #region IEqualityComparer<string> Members
    public bool Equals(
      string left,
      string right
      )
    {
2915
2916
2917
2918
2919
2920
2921
2922

2923


















#else
        return value.ToLower().GetHashCode();
#endif
      else
        throw new ArgumentNullException("value");
    }
    #endregion
  }

}

























|
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
#else
        return value.ToLower().GetHashCode();
#endif
      else
        throw new ArgumentNullException("value");
    }
    #endregion

    ///////////////////////////////////////////////////////////////////////////

    #region IComparer<string> Members
    public int Compare(
      string x,
      string y
      )
    {
      if ((x == null) && (y == null))
        return 0;
      else if (x == null)
        return -1;
      else if (y == null)
        return 1;
      else
        return x.CompareTo(y);
    }
    #endregion
  }
}