System.Data.SQLite
Check-in [8b0d28f75a]
Not logged in

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

Overview
Comment:Improve clarity of using statements in the UnsafeNativeMethods class. Also, obtain the static lock prior to touching settingReadCounts (only applies to Debug builds).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8b0d28f75a67bad54b6447ba1c437a2432d8c985
User & Date: mistachkin 2014-08-11 23:59:52
Context
2014-08-12
19:19
Add NoConvertSettings connection flag to disable querying of runtime configuration settings from within the SQLiteConvert class. Pursuant to [58ed318f2f]. check-in: 59d43c48bb user: mistachkin tags: trunk
2014-08-11
23:59
Improve clarity of using statements in the UnsafeNativeMethods class. Also, obtain the static lock prior to touching settingReadCounts (only applies to Debug builds). check-in: 8b0d28f75a user: mistachkin tags: trunk
2014-08-08
21:42
Apparently, using nullable value types in DbConnectionStringBuilder derived classes can cause issues; therefore, avoid it. check-in: 29c37848ff user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

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

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
...
270
271
272
273
274
275
276


277
278
279
280
281
282
283
284
285
286
287
288

289
290
291
292
293
294
295
  using System;
  using System.Globalization;

#if !NET_COMPACT_20 && (TRACE_DETECTION || TRACE_SHARED || TRACE_PRELOAD || TRACE_HANDLE)
  using System.Diagnostics;
#endif

#if PRELOAD_NATIVE_LIBRARY
  using System.Collections.Generic;
  using System.IO;
  using System.Reflection;
#endif

#if !PLATFORM_COMPACTFRAMEWORK && !DEBUG
  using System.Security;
#endif

  using System.Runtime.InteropServices;

................................................................................
          if (name == null)
              return @default;

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

          #region Debug Build Only
#if DEBUG


          //
          // NOTE: Update statistics for this setting value.
          //
          if (settingReadCounts != null)
          {
              int count;

              if (settingReadCounts.TryGetValue(name, out count))
                  settingReadCounts[name] = count + 1;
              else
                  settingReadCounts.Add(name, 1);
          }

#endif
          #endregion

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

          string value = null;








<



<







 







>
>












>







10
11
12
13
14
15
16

17
18
19

20
21
22
23
24
25
26
...
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
  using System;
  using System.Globalization;

#if !NET_COMPACT_20 && (TRACE_DETECTION || TRACE_SHARED || TRACE_PRELOAD || TRACE_HANDLE)
  using System.Diagnostics;
#endif


  using System.Collections.Generic;
  using System.IO;
  using System.Reflection;


#if !PLATFORM_COMPACTFRAMEWORK && !DEBUG
  using System.Security;
#endif

  using System.Runtime.InteropServices;

................................................................................
          if (name == null)
              return @default;

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

          #region Debug Build Only
#if DEBUG
          lock (staticSyncRoot)
          {
              //
              // NOTE: Update statistics for this setting value.
              //
              if (settingReadCounts != null)
              {
                  int count;

                  if (settingReadCounts.TryGetValue(name, out count))
                      settingReadCounts[name] = count + 1;
                  else
                      settingReadCounts.Add(name, 1);
              }
          }
#endif
          #endregion

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

          string value = null;