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 Unified Diffs Show Whitespace Changes Patch

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

213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
            "\r\n", message).Trim();
#endif
    }

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

    #region System.Object Overrides
    public override bool Equals(object obj)
    {
        SQLiteException exception = obj as SQLiteException;

        if (exception == null)
            return false;

        if (_errorCode != exception._errorCode)
            return false;

        if (String.Compare(
                Message, exception.Message,
                StringComparison.Ordinal) != 0)
        {
            return false;
        }

        return true;
    }

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

    public override int GetHashCode()
    {
        int result = base.GetHashCode();

        result ^= _errorCode.GetHashCode();

        return result;
    }

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

    public override string ToString()
    {
        return HelperMethods.StringFormat(
            CultureInfo.CurrentCulture, "code = {0} ({1}), message = {2}",
            _errorCode, (int)_errorCode, base.ToString());
    }
    #endregion







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







213
214
215
216
217
218
219

































220
221
222
223
224
225
226
            "\r\n", message).Trim();
#endif
    }

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

    #region System.Object Overrides

































    public override string ToString()
    {
        return HelperMethods.StringFormat(
            CultureInfo.CurrentCulture, "code = {0} ({1}), message = {2}",
            _errorCode, (int)_errorCode, base.ToString());
    }
    #endregion