System.Data.SQLite
Check-in [6eea79dc10]
Not logged in

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

Overview
Comment:Raise the static SQLiteConnection.Changed event when any SQLiteCommand or SQLiteDataReader object is disposed.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6eea79dc1082a65ab0626d0574152d0a09c5dfff
User & Date: mistachkin 2014-03-06 08:12:16
Context
2014-03-06
09:00
Also raise the static SQLiteConnection.Changed event when any SQLiteDataReader object is closed. check-in: ad12fa479a user: mistachkin tags: trunk
08:12
Raise the static SQLiteConnection.Changed event when any SQLiteCommand or SQLiteDataReader object is disposed. check-in: 6eea79dc10 user: mistachkin tags: trunk
06:49
For the NuGet packages supporting Entity Framework 6, only list the EF6 DbProviderFactory in the config file. check-in: bb6a9292c1 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Doc/Extra/Provider/version.html.

    42     42       </div>
    43     43       <div id="mainSection">
    44     44       <div id="mainBody">
    45     45       <h1 class="heading">Version History</h1>
    46     46       <p><b>1.0.92.0 - March XX, 2014 <font color="red">(release scheduled)</font></b></p>
    47     47       <ul>
    48     48         <li>Updated to <a href="http://www.sqlite.org/src/info/trunk">SQLite 3.8.4</a>.</li>
           49  +      <li>Raise the static SQLiteConnection.Changed event when any SQLiteCommand or SQLiteDataReader object is disposed.</li>
    49     50         <li>When the TraceWarning connection flag is set, issue warnings about possibly malformed UNC paths. Pursuant to <a href="http://system.data.sqlite.org/index.html/info/283344397b">[283344397b]</a>.</li>
    50     51         <li>Enhancements to the NuGet packages, including the new &quot;modular&quot; packages.</li>
    51     52       </ul>
    52     53       <p><b>1.0.91.0 - February 12, 2014</b></p>
    53     54       <ul>
    54     55         <li>Updated to <a href="http://www.sqlite.org/releaselog/3_8_3_1.html">SQLite 3.8.3.1</a>.</li>
    55     56         <li>Refresh all included SQLite core library documentation (e.g. SQL syntax).</li>

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

   185    185   
   186    186       /// <summary>
   187    187       /// Disposes of the command and clears all member variables
   188    188       /// </summary>
   189    189       /// <param name="disposing">Whether or not the class is being explicitly or implicitly disposed</param>
   190    190       protected override void Dispose(bool disposing)
   191    191       {
          192  +        SQLiteConnection.OnChanged(_cnn, new ConnectionEventArgs(
          193  +            SQLiteConnectionEventType.DisposingCommand, null, _transaction, this,
          194  +            null, null, null, new object[] { disposing, disposed }));
          195  +
   192    196           bool skippedDispose = false;
   193    197   
   194    198           try
   195    199           {
   196    200               if (!disposed)
   197    201               {
   198    202                   if (disposing)

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

  1414   1414         /// The connection is being closed.
  1415   1415         /// </summary>
  1416   1416         Closing = 10,
  1417   1417   
  1418   1418         /// <summary>
  1419   1419         /// The connection was closed.
  1420   1420         /// </summary>
  1421         -      Closed = 11
         1421  +      Closed = 11,
         1422  +
         1423  +      /// <summary>
         1424  +      /// A command is being disposed.
         1425  +      /// </summary>
         1426  +      DisposingCommand = 12,
         1427  +
         1428  +      /// <summary>
         1429  +      /// A data reader is being disposed.
         1430  +      /// </summary>
         1431  +      DisposingDataReader = 13
  1422   1432     }
  1423   1433   
  1424   1434     /// <summary>
  1425   1435     /// This implementation of SQLite for ADO.NET can process date/time fields in
  1426   1436     /// databases in one of six formats.
  1427   1437     /// </summary>
  1428   1438     /// <remarks>

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

   100    100         _version = _command.Connection._version;
   101    101         _baseSchemaName = _command.Connection._baseSchemaName;
   102    102   
   103    103         _commandBehavior = behave;
   104    104         _activeStatementIndex = -1;
   105    105         _rowsAffected = -1;
   106    106   
          107  +      SQLiteConnection.OnChanged(GetConnection(this),
          108  +          new ConnectionEventArgs(SQLiteConnectionEventType.NewDataReader,
          109  +          null, null, _command, this, null, null, new object[] { behave }));
          110  +
   107    111         if (_command != null)
   108         -      {
   109         -          SQLiteConnection.OnChanged(_command.Connection,
   110         -              new ConnectionEventArgs(SQLiteConnectionEventType.NewDataReader,
   111         -              null, null, _command, this, null, null, new object[] { behave }));
   112         -
   113    112             NextResult();
   114         -      }
   115    113       }
   116    114   
   117    115       ///////////////////////////////////////////////////////////////////////////////////////////////
   118    116   
   119    117       #region IDisposable "Pattern" Members
   120    118       private bool disposed;
   121    119       private void CheckDisposed() /* throw */
................................................................................
   130    128   
   131    129       /// <summary>
   132    130       /// Dispose of all resources used by this datareader.
   133    131       /// </summary>
   134    132       /// <param name="disposing"></param>
   135    133       protected override void Dispose(bool disposing)
   136    134       {
          135  +        SQLiteConnection.OnChanged(GetConnection(this),
          136  +            new ConnectionEventArgs(SQLiteConnectionEventType.DisposingDataReader,
          137  +            null, null, _command, this, null, null, new object[] { disposing,
          138  +            disposed, _commandBehavior, _readingState, _rowsAffected, _fieldCount,
          139  +            _disposeCommand, _throwOnDisposed }));
          140  +
   137    141           try
   138    142           {
   139    143               if (!disposed)
   140    144               {
   141    145                   //if (disposing)
   142    146                   //{
   143    147                   //    ////////////////////////////////////

Changes to Tests/tkt-aba4549801.eagle.

    65     65   regexp -result {^\{System#Data#SQLite#SQLiteConnection#\d+ Opening \{\} \{\}\
    66     66   \{\} \{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ Closing \{\} \{\} \{\}\
    67     67   \{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ Closed \{\} \{\} \{\} \{\}\}\
    68     68   \{System#Data#SQLite#SQLiteConnection#\d+ ConnectionString \{\} \{\} \{\}\
    69     69   \{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\
    70     70   System#Data#SQLite#SQLiteConnectionHandle#\d+\}\
    71     71   \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
           72  +System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
           73  +\{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
    72     74   System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
    73     75   \{System#Data#SQLite#SQLiteConnection#\d+ Opened \{\} \{\} \{\} \{\}\}\
    74     76   \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
    75     77   System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
    76     78   \{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\
    77     79   System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
    78     80   \{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\
    79     81   System#Data#SQLite#SQLiteStatementHandle#\d+\}\
           82  +\{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\
           83  +System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
           84  +\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
           85  +System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
    80     86   \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
    81     87   System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
    82     88   \{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\
    83     89   System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
    84     90   \{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\
    85     91   System#Data#SQLite#SQLiteStatementHandle#\d+\}\
           92  +\{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\
           93  +System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
           94  +\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
           95  +System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
    86     96   \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
    87     97   System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
    88     98   \{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\
    89     99   System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
    90    100   \{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\
    91    101   System#Data#SQLite#SQLiteStatementHandle#\d+\}\
          102  +\{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\
          103  +System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
          104  +\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
          105  +System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
    92    106   \{System#Data#SQLite#SQLiteConnection#\d+ NewTransaction\
    93    107   System#Data#SQLite#SQLiteTransaction#\d+ \{\} \{\} \{\}\}\
    94    108   \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
    95    109   System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
    96    110   \{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\
    97    111   System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
    98    112   \{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\
    99    113   System#Data#SQLite#SQLiteStatementHandle#\d+\} \{System#Object#\d+\
   100    114   NewCriticalHandle \{\} \{\} \{\} System#Data#SQLite#SQLiteStatementHandle#\d+\}\
          115  +\{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
          116  +System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
   101    117   \{System#Data#SQLite#SQLiteConnection#\d+ NewCommand \{\}\
   102    118   System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
   103    119   \{System#Data#SQLite#SQLiteConnection#\d+ NewDataReader \{\}\
   104    120   System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
   105    121   \{\}\} \{System#Object#\d+ NewCriticalHandle \{\} \{\} \{\}\
   106    122   System#Data#SQLite#SQLiteStatementHandle#\d+\}\
          123  +\{System#Data#SQLite#SQLiteConnection#\d+ DisposingDataReader \{\}\
          124  +System#Data#SQLite#SQLiteCommand#\d+ System#Data#SQLite#SQLiteDataReader#\d+\
          125  +\{\}\} \{System#Data#SQLite#SQLiteConnection#\d+ DisposingCommand \{\}\
          126  +System#Data#SQLite#SQLiteCommand#\d+ \{\} \{\}\}\
   107    127   \{System#Data#SQLite#SQLiteConnection#\d+ Closing \{\} \{\} \{\} \{\}\}\
   108    128   \{System#Data#SQLite#SQLiteConnection#\d+ Closed \{\} \{\} \{\} \{\}\}\
   109    129   \{System#Data#SQLite#SQLiteConnection#\d+ Closing \{\} \{\} \{\} \{\}\}\
   110    130   \{System#Data#SQLite#SQLiteConnection#\d+ Closed \{\} \{\} \{\} \{\}\}$}}
   111    131   
   112    132   ###############################################################################
   113    133   
   114    134   runSQLiteTestEpilogue
   115    135   runTestEpilogue

Changes to readme.htm.

   209    209   <h2><b>Version History</b></h2>
   210    210   
   211    211   <p>
   212    212       <b>1.0.92.0 - March XX, 2014 <font color="red">(release scheduled)</font></b>
   213    213   </p>
   214    214   <ul>
   215    215       <li>Updated to <a href="http://www.sqlite.org/src/info/trunk">SQLite 3.8.4</a>.</li>
          216  +    <li>Raise the static SQLiteConnection.Changed event when any SQLiteCommand or SQLiteDataReader object is disposed.</li>
   216    217       <li>When the TraceWarning connection flag is set, issue warnings about possibly malformed UNC paths. Pursuant to [283344397b].</li>
   217    218       <li>Enhancements to the NuGet packages, including the new &quot;modular&quot; packages.</li>
   218    219   </ul>
   219    220   <p>
   220    221       <b>1.0.91.0 - February 12, 2014</b>
   221    222   </p>
   222    223   <ul>

Changes to www/news.wiki.

     3      3   <b>Version History</b>
     4      4   
     5      5   <p>
     6      6       <b>1.0.92.0 - March XX, 2014 <font color="red">(release scheduled)</font></b>
     7      7   </p>
     8      8   <ul>
     9      9       <li>Updated to <a href="http://www.sqlite.org/src/info/trunk">SQLite 3.8.4</a>.</li>
           10  +    <li>Raise the static SQLiteConnection.Changed event when any SQLiteCommand or SQLiteDataReader object is disposed.</li>
    10     11       <li>When the TraceWarning connection flag is set, issue warnings about possibly malformed UNC paths. Pursuant to [283344397b].</li>
    11     12       <li>Enhancements to the NuGet packages, including the new &quot;modular&quot; packages.</li>
    12     13   </ul>
    13     14   <p>
    14     15       <b>1.0.91.0 - February 12, 2014</b>
    15     16   </p>
    16     17   <ul>