System.Data.SQLite
Check-in [69f6030c7f]
Not logged in

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

Overview
Comment:Fire notification events before a connection is opened or closed. Enhance documentation comments to that include references. Workaround issue in NDoc3 to allow project reference links to be resolved correctly.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 69f6030c7fec9974bebb86d0889c5ca74940c55b
User & Date: mistachkin 2012-09-20 02:39:00
Context
2012-09-20
11:53
Allow opened connections to skip adding the extension functions included in the interop assembly. Support loading of SQLite extensions. Add more notifications that use the new static Changed event. Miscellaneous comment cleanup. Cleanup usage of compile-time options for the .NET Framework version. Fix argument checking for the batch file tools. check-in: 5759e099be user: mistachkin tags: trunk
02:39
Fire notification events before a connection is opened or closed. Enhance documentation comments to that include references. Workaround issue in NDoc3 to allow project reference links to be resolved correctly. check-in: 69f6030c7f user: mistachkin tags: trunk
00:50
Remove suppression for warning 4703 from the source code and add it to the property files. check-in: cdb73c1d3f user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Doc/buildChm.tcl.

    34     34   }
    35     35   
    36     36   set path [file dirname [info script]]
    37     37   
    38     38   set nDocPath [file join $env(ProgramFiles) NDoc3]
    39     39   
    40     40   if {![file isdirectory $nDocPath]} then {
    41         -  puts stdout "NDoc3 must be installed to: $nDocPath"; exit 1
           41  +  puts stdout "NDoc3 must be installed to: $nDocPath"
           42  +  exit 1
    42     43   }
    43     44   
    44     45   set hhcPath [file join $env(ProgramFiles) "HTML Help Workshop"]
    45     46   
    46     47   if {![file isdirectory $hhcPath]} then {
    47         -  puts stdout "HTML Help Workshop must be installed to: $hhcPath"; exit 1
           48  +  puts stdout "HTML Help Workshop must be installed to: $hhcPath"
           49  +  exit 1
           50  +}
           51  +
           52  +#
           53  +# NOTE: Build the name of the NDoc project file.
           54  +#
           55  +set projectFile [file join $path SQLite.NET.ndoc]
           56  +
           57  +if {![file exists $projectFile]} then {
           58  +  puts stdout "Cannot find NDoc3 project file: $projectFile"
           59  +  exit 1
           60  +}
           61  +
           62  +#
           63  +# NOTE: Extract the name of the XML doc file that will be used to build
           64  +#       the final CHM file from the NDoc project file.
           65  +#
           66  +set data [readFile $projectFile]
           67  +
           68  +if {[string length $data] == 0} then {
           69  +  puts stdout "NDoc3 project file contains no data: $projectFile"
           70  +  exit 1
           71  +}
           72  +
           73  +if {![regexp -- { documentation="(.*?)" } $data dummy xmlDocFile]} then {
           74  +  puts stdout "Cannot find XML doc file name in NDoc3 project file:\
           75  +               $projectFile"
           76  +  exit 1
           77  +}
           78  +
           79  +if {[string length $xmlDocFile] == 0 || ![file exists $xmlDocFile]} then {
           80  +  puts stdout "Cannot find XML doc file: $xmlDocFile"
           81  +  exit 1
           82  +}
           83  +
           84  +set data [readFile $xmlDocFile]
           85  +set pattern { cref="([A-Z]):System\.Data\.SQLite\.}
           86  +set count [regsub -all -- $pattern $data { cref="\1:system.Data.SQLite.} data]
           87  +
           88  +if {$count > 0} then {
           89  +  writeFile $xmlDocFile $data
           90  +} else {
           91  +  puts stdout "*WARNING* File \"$xmlDocFile\" does not match: $pattern"
    48     92   }
    49     93   
    50     94   #
    51     95   # TODO: If the NDoc version number ever changes, the next line of code will
    52     96   #       probably need to be updated.
    53     97   #
    54     98   set outputPath [file join Output ndoc3_msdn_temp]
    55     99   
    56    100   set code [catch {exec [file join $nDocPath bin NDoc3Console.exe] \
    57         -    "-project=[file nativename [file join $path SQLite.NET.ndoc]]"} result]
          101  +    "-project=[file nativename $projectFile]"} result]
    58    102   
    59    103   puts stdout $result; if {$code != 0} then {exit $code}
    60    104   
    61    105   set fileNames [list SQLite.NET.hhp SQLite.NET.hhc]
    62    106   
    63    107   set exps(.hhc,1) {<!--This document contains Table of Contents information for\
    64    108   the HtmlHelp compiler\.--><UL>}
................................................................................
    73    117   foreach fileName $fileNames {
    74    118     set fileName [file join $path $outputPath $fileName]
    75    119   
    76    120     #
    77    121     # NOTE: Make sure the file we need actually exists.
    78    122     #
    79    123     if {![file isfile $fileName]} then {
    80         -    puts stdout "Cannot find file: $fileName"; exit 1
          124  +    puts stdout "Cannot find file: $fileName"
          125  +    exit 1
    81    126     }
    82    127   
    83    128     #
    84    129     # NOTE: Read the entire file into memory.
    85    130     #
    86    131     set data [readFile $fileName]
    87    132   
................................................................................
   122    167   # NOTE: For hhc.exe, zero means failure.
   123    168   #
   124    169   puts stdout $result; if {$code == 0} then {exit 1}
   125    170   
   126    171   file copy -force [file join $path $outputPath SQLite.NET.chm] \
   127    172       [file join $path SQLite.NET.chm]
   128    173   
   129         -puts stdout SUCCESS; exit 0
          174  +puts stdout SUCCESS
          175  +exit 0

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

    13     13     using System.Diagnostics;
    14     14     using System.Collections.Generic;
    15     15     using System.Globalization;
    16     16     using System.ComponentModel;
    17     17     using System.Runtime.InteropServices;
    18     18     using System.IO;
    19     19   
           20  +  /////////////////////////////////////////////////////////////////////////////////////////////////
           21  +
           22  +  /// <summary>
           23  +  /// Event data for connection event handlers.
           24  +  /// </summary>
           25  +  public class ConnectionEventArgs : EventArgs
           26  +  {
           27  +      /// <summary>
           28  +      /// The type of event being raised.
           29  +      /// </summary>
           30  +      public readonly SQLiteConnectionEventType EventType;
           31  +
           32  +      /// <summary>
           33  +      /// The <see cref="StateChangeEventArgs" /> associated with this event, if any.
           34  +      /// </summary>
           35  +      public readonly StateChangeEventArgs EventArgs;
           36  +
           37  +      /// <summary>
           38  +      /// Command or message text associated with this event, if any.
           39  +      /// </summary>
           40  +      public readonly string Text;
           41  +
           42  +      /// <summary>
           43  +      /// Extra data associated with this event, if any.
           44  +      /// </summary>
           45  +      public readonly object Data;
           46  +
           47  +      /// <summary>
           48  +      /// Constructs the object.
           49  +      /// </summary>
           50  +      /// <param name="eventType">The type of event being raised.</param>
           51  +      /// <param name="eventArgs">The base <see cref="EventArgs" /> associated
           52  +      /// with this event, if any.</param>
           53  +      /// <param name="text">The command or message text, if any.</param>
           54  +      /// <param name="data">The extra data, if any.</param>
           55  +      internal ConnectionEventArgs(
           56  +          SQLiteConnectionEventType eventType,
           57  +          StateChangeEventArgs eventArgs,
           58  +          string text,
           59  +          object data
           60  +          )
           61  +      {
           62  +          EventType = eventType;
           63  +          EventArgs = eventArgs;
           64  +          Text = text;
           65  +          Data = data;
           66  +      }
           67  +  }
           68  +
           69  +  /////////////////////////////////////////////////////////////////////////////////////////////////
           70  +
           71  +  /// <summary>
           72  +  /// Raised when an event pertaining to a connection occurs.
           73  +  /// </summary>
           74  +  /// <param name="sender">The connection involved.</param>
           75  +  /// <param name="e">Extra information about the event.</param>
           76  +  public delegate void SQLiteConnectionEventHandler(object sender, ConnectionEventArgs e);
           77  +
           78  +  /////////////////////////////////////////////////////////////////////////////////////////////////
           79  +
    20     80     /// <summary>
    21     81     /// SQLite implentation of DbConnection.
    22     82     /// </summary>
    23     83     /// <remarks>
    24         -  /// The <see cref="ConnectionString">ConnectionString</see> property of the SQLiteConnection class can contain the following parameter(s), delimited with a semi-colon:
           84  +  /// The <see cref="ConnectionString" /> property can contain the following parameter(s), delimited with a semi-colon:
    25     85     /// <list type="table">
    26     86     /// <listheader>
    27     87     /// <term>Parameter</term>
    28     88     /// <term>Values</term>
    29     89     /// <term>Required</term>
    30     90     /// <term>Default</term>
    31     91     /// </listheader>
................................................................................
   169    229     /// <description>Foreign Keys</description>
   170    230     /// <description>Enable foreign key constraints</description>
   171    231     /// <description>N</description>
   172    232     /// <description>False</description>
   173    233     /// </item>
   174    234     /// <item>
   175    235     /// <description>Flags</description>
   176         -  /// <description>Extra behavioral flags for the connection.  See the SQLiteConnectionFlags enumeration for possible values.</description>
          236  +  /// <description>Extra behavioral flags for the connection.  See the <see cref="SQLiteConnectionFlags" /> enumeration for possible values.</description>
   177    237     /// <description>N</description>
   178    238     /// <description>Default</description>
   179    239     /// </item>
   180    240     /// <item>
   181    241     /// <description>SetDefaults</description>
   182    242     /// <description>
   183    243     /// <b>True</b> - Apply the default connection settings to the opened database.<br/>
................................................................................
   195    255     /// <description>N</description>
   196    256     /// <description>True</description>
   197    257     /// </item>
   198    258     /// </list>
   199    259     /// </remarks>
   200    260     public sealed partial class SQLiteConnection : DbConnection, ICloneable
   201    261     {
          262  +    #region Private Constants
   202    263       /// <summary>
   203    264       /// The default "stub" (i.e. placeholder) base schema name to use when
   204    265       /// returning column schema information.  Used as the initial value of
   205    266       /// the BaseSchemaName property.  This should start with "sqlite_*"
   206    267       /// because those names are reserved for use by SQLite (i.e. they cannot
   207    268       /// be confused with the names of user objects).
   208    269       /// </summary>
................................................................................
   238    299       private const bool DefaultSetDefaults = true;
   239    300   
   240    301       private const int SQLITE_FCNTL_WIN32_AV_RETRY = 9;
   241    302   
   242    303       private const string _dataDirectory = "|DataDirectory|";
   243    304       private const string _masterdb = "sqlite_master";
   244    305       private const string _tempmasterdb = "sqlite_temp_master";
          306  +    #endregion
   245    307   
          308  +    ///////////////////////////////////////////////////////////////////////////////////////////////
          309  +
          310  +    #region Private Static Data
          311  +    /// <summary>
          312  +    /// Object used to synchronize access to the static instance data
          313  +    /// for this class.
          314  +    /// </summary>
          315  +    private static object _syncRoot = new object();
          316  +
          317  +    /// <summary>
          318  +    /// Static variable to store the connection event handlers to call.
          319  +    /// </summary>
          320  +    private static event SQLiteConnectionEventHandler _handlers;
          321  +    #endregion
          322  +
          323  +    ///////////////////////////////////////////////////////////////////////////////////////////////
          324  +
          325  +    #region Private Data
   246    326       /// <summary>
   247    327       /// State of the current connection
   248    328       /// </summary>
   249    329       private ConnectionState _connectionState;
   250    330       /// <summary>
   251    331       /// The connection string
   252    332       /// </summary>
................................................................................
   287    367       /// The "stub" (i.e. placeholder) base schema name to use when returning
   288    368       /// column schema information.
   289    369       /// </summary>
   290    370       internal string _baseSchemaName;
   291    371   
   292    372       /// <summary>
   293    373       /// The extra behavioral flags for this connection, if any.  See the
   294         -    /// SQLiteConnectionFlags enumeration for a list of possible values.
          374  +    /// <see cref="SQLiteConnectionFlags" /> enumeration for a list of
          375  +    /// possible values.
   295    376       /// </summary>
   296    377       private SQLiteConnectionFlags _flags;
   297    378   
   298    379       /// <summary>
   299    380       /// Default command timeout
   300    381       /// </summary>
   301    382       private int _defaultTimeout = 30;
................................................................................
   309    390       private event SQLiteTraceEventHandler _traceHandler;
   310    391       private event EventHandler _rollbackHandler;
   311    392   
   312    393       private SQLiteUpdateCallback _updateCallback;
   313    394       private SQLiteCommitCallback _commitCallback;
   314    395       private SQLiteTraceCallback _traceCallback;
   315    396       private SQLiteRollbackCallback _rollbackCallback;
          397  +    #endregion
          398  +
          399  +    ///////////////////////////////////////////////////////////////////////////////////////////////
   316    400   
   317    401       /// <summary>
   318    402       /// This event is raised whenever the database is opened or closed.
   319    403       /// </summary>
   320    404       public override event StateChangeEventHandler StateChange;
          405  +
          406  +    ///////////////////////////////////////////////////////////////////////////////////////////////
   321    407   
   322    408       ///<overloads>
   323    409       /// Constructs a new SQLiteConnection object
   324    410       /// </overloads>
   325    411       /// <summary>
   326    412       /// Default constructor
   327    413       /// </summary>
................................................................................
   383    469                   cmd.ExecuteNonQuery();
   384    470                 }
   385    471               }
   386    472             }
   387    473           }
   388    474         }
   389    475       }
          476  +
          477  +    ///////////////////////////////////////////////////////////////////////////////////////////////
          478  +
          479  +    /// <summary>
          480  +    /// Raises the <see cref="Changed" /> event.
          481  +    /// </summary>
          482  +    /// <param name="connection">
          483  +    /// The connection associated with this event.
          484  +    /// </param>
          485  +    /// <param name="e">
          486  +    /// A <see cref="ConnectionEventArgs" /> that contains the event data.
          487  +    /// </param>
          488  +    public static void OnChanged(
          489  +        SQLiteConnection connection,
          490  +        ConnectionEventArgs e
          491  +        )
          492  +    {
          493  +        if (connection == null)
          494  +            return;
          495  +
          496  +#if !PLATFORM_COMPACTFRAMEWORK
          497  +        if (!connection.CanRaiseEvents)
          498  +            return;
          499  +#endif
          500  +
          501  +        SQLiteConnectionEventHandler handlers;
          502  +
          503  +        lock (_syncRoot)
          504  +        {
          505  +            handlers = _handlers;
          506  +        }
          507  +
          508  +        if (handlers != null) handlers(connection, e);
          509  +    }
          510  +
          511  +    ///////////////////////////////////////////////////////////////////////////////////////////////
          512  +
          513  +    /// <summary>
          514  +    /// This event is raised when events related to the lifecycle of a
          515  +    /// SQLiteConnection object occur.
          516  +    /// </summary>
          517  +    public static event SQLiteConnectionEventHandler Changed
          518  +    {
          519  +        add
          520  +        {
          521  +            lock (_syncRoot)
          522  +            {
          523  +                // Remove any copies of this event handler from registered
          524  +                // list.  This essentially means that a handler will be
          525  +                // called only once no matter how many times it is added.
          526  +                _handlers -= value;
          527  +
          528  +                // Add this to the list of event handlers.
          529  +                _handlers += value;
          530  +            }
          531  +        }
          532  +        remove
          533  +        {
          534  +            lock (_syncRoot)
          535  +            {
          536  +                _handlers -= value;
          537  +            }
          538  +        }
          539  +    }
   390    540   
   391    541       ///////////////////////////////////////////////////////////////////////////////////////////////
   392    542   
   393    543       #region Backup API Members
   394    544       /// <summary>
   395    545       /// Backs up the database, using the specified database connection as the
   396    546       /// destination.
................................................................................
   616    766         FileStream fs = File.Create(databaseFileName);
   617    767         fs.Close();
   618    768       }
   619    769   
   620    770       /// <summary>
   621    771       /// Raises the state change event when the state of the connection changes
   622    772       /// </summary>
   623         -    /// <param name="newState">The new state.  If it is different from the previous state, an event is raised.</param>
   624         -    internal void OnStateChange(ConnectionState newState)
          773  +    /// <param name="newState">The new connection state.  If this is different
          774  +    /// from the previous state, the <see cref="StateChange" /> event is
          775  +    /// raised.</param>
          776  +    /// <param name="eventArgs">The event data created for the raised event, if
          777  +    /// it was actually raised.</param>
          778  +    internal void OnStateChange(
          779  +        ConnectionState newState,
          780  +        ref StateChangeEventArgs eventArgs
          781  +        )
   625    782       {
   626         -      ConnectionState oldState = _connectionState;
   627         -      _connectionState = newState;
          783  +        ConnectionState oldState = _connectionState;
   628    784   
   629         -      if (StateChange != null && oldState != newState)
   630         -      {
   631         -        StateChangeEventArgs e = new StateChangeEventArgs(oldState, newState);
   632         -        StateChange(this, e);
   633         -      }
          785  +        _connectionState = newState;
          786  +
          787  +        if ((StateChange != null) && (newState != oldState))
          788  +        {
          789  +            StateChangeEventArgs localEventArgs =
          790  +                new StateChangeEventArgs(oldState, newState);
          791  +
          792  +            StateChange(this, localEventArgs);
          793  +
          794  +            eventArgs = localEventArgs;
          795  +        }
   634    796       }
   635    797   
   636    798       /// <summary>
   637    799       /// OBSOLETE.  Creates a new SQLiteTransaction if one isn't already active on the connection.
   638    800       /// </summary>
   639    801       /// <param name="isolationLevel">This parameter is ignored.</param>
   640    802       /// <param name="deferredLock">When TRUE, SQLite defers obtaining a write lock until a write operation is requested.
................................................................................
   723    885       /// <summary>
   724    886       /// When the database connection is closed, all commands linked to this connection are automatically reset.
   725    887       /// </summary>
   726    888       public override void Close()
   727    889       {
   728    890         CheckDisposed();
   729    891   
          892  +      OnChanged(this, new ConnectionEventArgs(
          893  +          SQLiteConnectionEventType.Closing, null, null, null));
          894  +
   730    895         if (_sql != null)
   731    896         {
   732    897   #if !PLATFORM_COMPACTFRAMEWORK
   733    898           if (_enlistment != null)
   734    899           {
   735    900             // If the connection is enlisted in a transaction scope and the scope is still active,
   736    901             // we cannot truly shut down this connection until the scope has completed.  Therefore make a
................................................................................
   752    917           if (_sql != null)
   753    918           {
   754    919             _sql.Close();
   755    920             _sql = null;
   756    921           }
   757    922           _transactionLevel = 0;
   758    923         }
   759         -      OnStateChange(ConnectionState.Closed);
          924  +
          925  +      StateChangeEventArgs eventArgs = null;
          926  +      OnStateChange(ConnectionState.Closed, ref eventArgs);
          927  +
          928  +      OnChanged(this, new ConnectionEventArgs(
          929  +          SQLiteConnectionEventType.Closed, eventArgs, null, null));
   760    930       }
   761    931   
   762    932       /// <summary>
   763    933       /// Returns the number of pool entries for the file name associated with this connection.
   764    934       /// </summary>
   765    935       public int PoolCount
   766    936       {
................................................................................
   941   1111       /// <description>Foreign Keys</description>
   942   1112       /// <description>Enable foreign key constraints</description>
   943   1113       /// <description>N</description>
   944   1114       /// <description>False</description>
   945   1115       /// </item>
   946   1116       /// <item>
   947   1117       /// <description>Flags</description>
   948         -    /// <description>Extra behavioral flags for the connection.  See the SQLiteConnectionFlags enumeration for possible values.</description>
         1118  +    /// <description>Extra behavioral flags for the connection.  See the <see cref="SQLiteConnectionFlags" /> enumeration for possible values.</description>
   949   1119       /// <description>N</description>
   950   1120       /// <description>Default</description>
   951   1121       /// </item>
   952   1122       /// <item>
   953   1123       /// <description>SetDefaults</description>
   954   1124       /// <description>
   955   1125       /// <b>True</b> - Apply the default connection settings to the opened database.<br/>
................................................................................
  1145   1315               // do nothing.
  1146   1316           }
  1147   1317   
  1148   1318           return null;
  1149   1319       }
  1150   1320   
  1151   1321       /// <summary>
  1152         -    /// Opens the connection using the parameters found in the <see cref="ConnectionString">ConnectionString</see>
         1322  +    /// Opens the connection using the parameters found in the <see cref="ConnectionString" />.
  1153   1323       /// </summary>
  1154   1324       public override void Open()
  1155   1325       {
  1156   1326         CheckDisposed();
  1157   1327   
         1328  +      OnChanged(this, new ConnectionEventArgs(
         1329  +          SQLiteConnectionEventType.Opening, null, null, null));
         1330  +
  1158   1331         if (_connectionState != ConnectionState.Closed)
  1159   1332           throw new InvalidOperationException();
  1160   1333   
  1161   1334         Close();
  1162   1335   
  1163   1336         SortedList<string, string> opts = ParseConnectionString(_connectionString);
  1164   1337   
................................................................................
  1387   1560                 SQLiteConvert.ToBoolean(FindKey(opts, "Enlist", DefaultEnlist.ToString())))
  1388   1561             {
  1389   1562                 EnlistTransaction(transaction);
  1390   1563             }
  1391   1564   #endif
  1392   1565   
  1393   1566             _connectionState = oldstate;
  1394         -          OnStateChange(ConnectionState.Open);
         1567  +
         1568  +          StateChangeEventArgs eventArgs = null;
         1569  +          OnStateChange(ConnectionState.Open, ref eventArgs);
         1570  +
         1571  +          OnChanged(this, new ConnectionEventArgs(
         1572  +              SQLiteConnectionEventType.Opened, eventArgs, null, null));
  1395   1573           }
  1396   1574           catch
  1397   1575           {
  1398   1576             _connectionState = oldstate;
  1399   1577             throw;
  1400   1578           }
  1401   1579         }
................................................................................
  1403   1581         {
  1404   1582           Close();
  1405   1583           throw;
  1406   1584         }
  1407   1585       }
  1408   1586   
  1409   1587       /// <summary>
  1410         -    /// Opens the connection using the parameters found in the <see cref="ConnectionString">ConnectionString</see> and then returns it.
         1588  +    /// Opens the connection using the parameters found in the <see cref="ConnectionString" /> and then returns it.
  1411   1589       /// </summary>
  1412   1590       /// <returns>The current connection object.</returns>
  1413   1591       public SQLiteConnection OpenAndReturn()
  1414   1592       {
  1415   1593           CheckDisposed(); Open(); return this;
  1416   1594       }
  1417   1595   
................................................................................
  1424   1602       {
  1425   1603         get { CheckDisposed(); return _defaultTimeout; }
  1426   1604         set { CheckDisposed(); _defaultTimeout = value; }
  1427   1605       }
  1428   1606   
  1429   1607       /// <summary>
  1430   1608       /// Gets/sets the extra behavioral flags for this connection.  See the
  1431         -    /// SQLiteConnectionFlags enumeration for a list of possible values.
         1609  +    /// <see cref="SQLiteConnectionFlags" /> enumeration for a list of
         1610  +    /// possible values.
  1432   1611       /// </summary>
  1433   1612       public SQLiteConnectionFlags Flags
  1434   1613       {
  1435   1614         get { CheckDisposed(); return _flags; }
  1436   1615         set { CheckDisposed(); _flags = value; }
  1437   1616       }
  1438   1617   

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

   981    981       /// </summary>
   982    982       DateTime = 10,
   983    983       /// <summary>
   984    984       /// Used internally
   985    985       /// </summary>
   986    986       None = 11,
   987    987     }
          988  +
          989  +  /// <summary>
          990  +  /// These are the event types associated with the
          991  +  /// <see cref="SQLiteConnectionEventHandler" />
          992  +  /// delegate (and its corresponding event) and the
          993  +  /// <see cref="ConnectionEventArgs" /> class.
          994  +  /// </summary>
          995  +  public enum SQLiteConnectionEventType
          996  +  {
          997  +      /// <summary>
          998  +      /// Not used.
          999  +      /// </summary>
         1000  +      Invalid = -1,
         1001  +
         1002  +      /// <summary>
         1003  +      /// Not used.
         1004  +      /// </summary>
         1005  +      Unknown = 0,
         1006  +
         1007  +      /// <summary>
         1008  +      /// The connection is being opened.
         1009  +      /// </summary>
         1010  +      Opening = 1,
         1011  +
         1012  +      /// <summary>
         1013  +      /// The connection was opened.
         1014  +      /// </summary>
         1015  +      Opened = 2,
         1016  +
         1017  +      /// <summary>
         1018  +      /// The connection is being closed.
         1019  +      /// </summary>
         1020  +      Closing = 3,
         1021  +
         1022  +      /// <summary>
         1023  +      /// The connection was closed.
         1024  +      /// </summary>
         1025  +      Closed = 4
         1026  +  }
   988   1027   
   989   1028     /// <summary>
   990   1029     /// This implementation of SQLite for ADO.NET can process date/time fields in databases in only one of three formats.  Ticks, ISO8601
   991   1030     /// and JulianDay.
   992   1031     /// </summary>
   993   1032     /// <remarks>
   994   1033     /// ISO8601 is more compatible, readable, fully-processable, but less accurate as it doesn't provide time down to fractions of a second.

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

    14     14       /// <summary>
    15     15       /// Event data for logging event handlers.
    16     16       /// </summary>
    17     17       public class LogEventArgs : EventArgs
    18     18       {
    19     19           /// <summary>
    20     20           /// The error code.  The type of this object value should be
    21         -        /// System.Int32 or SQLiteErrorCode.
           21  +        /// <see cref="Int32" /> or <see cref="SQLiteErrorCode" />.
    22     22           /// </summary>
    23     23           public readonly object ErrorCode;
    24     24   
    25     25           /// <summary>
    26     26           /// SQL statement text as the statement first begins executing
    27     27           /// </summary>
    28     28           public readonly string Message;
................................................................................
    29     29   
    30     30           /// <summary>
    31     31           /// Extra data associated with this event, if any.
    32     32           /// </summary>
    33     33           public readonly object Data;
    34     34   
    35     35           /// <summary>
    36         -        /// Constructs the LogEventArgs object.
           36  +        /// Constructs the object.
    37     37           /// </summary>
    38     38           /// <param name="pUserData">Should be null.</param>
    39     39           /// <param name="errorCode">
    40     40           /// The error code.  The type of this object value should be
    41         -        /// System.Int32 or SQLiteErrorCode.
           41  +        /// <see cref="Int32" /> or <see cref="SQLiteErrorCode" />.
    42     42           /// </param>
    43     43           /// <param name="message">The error message, if any.</param>
    44     44           /// <param name="data">The extra data, if any.</param>
    45     45           internal LogEventArgs(
    46     46               IntPtr pUserData,
    47     47               object errorCode,
    48     48               string message,