System.Data.SQLite
Check-in [242ef0c9a1]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove overrides of GetHashCode/Equals from SQLiteException (added by check-in [37dcaf8f5d]) because they are superfluous and cannot readily take into account all base class state.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 242ef0c9a1eda34cb617e36f65011abaa256ee9f
User & Date: mistachkin 2018-02-08 17:45:08
Context
2018-02-20
10:46
Test portability fixes for Mono on POSIX. check-in: ed9c4825db user: mistachkin tags: trunk
2018-02-08
17:45
Remove overrides of GetHashCode/Equals from SQLiteException (added by check-in [37dcaf8f5d]) because they are superfluous and cannot readily take into account all base class state. check-in: 242ef0c9a1 user: mistachkin tags: trunk
06:08
Add tests for ticket [53962f9eff]. check-in: 5c1fba537e user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to System.Data.SQLite/SQLiteException.cs.

   213    213               "\r\n", message).Trim();
   214    214   #endif
   215    215       }
   216    216   
   217    217       ///////////////////////////////////////////////////////////////////////////
   218    218   
   219    219       #region System.Object Overrides
   220         -    public override bool Equals(object obj)
   221         -    {
   222         -        SQLiteException exception = obj as SQLiteException;
   223         -
   224         -        if (exception == null)
   225         -            return false;
   226         -
   227         -        if (_errorCode != exception._errorCode)
   228         -            return false;
   229         -
   230         -        if (String.Compare(
   231         -                Message, exception.Message,
   232         -                StringComparison.Ordinal) != 0)
   233         -        {
   234         -            return false;
   235         -        }
   236         -
   237         -        return true;
   238         -    }
   239         -
   240         -    ///////////////////////////////////////////////////////////////////////////
   241         -
   242         -    public override int GetHashCode()
   243         -    {
   244         -        int result = base.GetHashCode();
   245         -
   246         -        result ^= _errorCode.GetHashCode();
   247         -
   248         -        return result;
   249         -    }
   250         -
   251         -    ///////////////////////////////////////////////////////////////////////////
   252         -
   253    220       public override string ToString()
   254    221       {
   255    222           return HelperMethods.StringFormat(
   256    223               CultureInfo.CurrentCulture, "code = {0} ({1}), message = {2}",
   257    224               _errorCode, (int)_errorCode, base.ToString());
   258    225       }
   259    226       #endregion