System.Data.SQLite
Check-in [2f356ea98e]
Not logged in

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

Overview
Comment:Miscellaneous cleanup and comment changes in the design-time components installer.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2f356ea98e27c3c0fcffdaddb45bf3ca713cb9a4
User & Date: mistachkin 2014-07-31 21:43:26
Context
2014-07-31
22:35
Clarify description for the Ngen task in the setup packages. check-in: 23e6a9b85f user: mistachkin tags: trunk
21:43
Miscellaneous cleanup and comment changes in the design-time components installer. check-in: 2f356ea98e user: mistachkin tags: trunk
21:24
Remove accidentally duplicated debugging code in the design-time components installer. check-in: 6bd339500c user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tools/install/Installer.cs.

  1954   1954               private const string Ef6FactoryTypeName =
  1955   1955                   "System.Data.SQLite.EF6.SQLiteProviderFactory";
  1956   1956               #endregion
  1957   1957   
  1958   1958               ///////////////////////////////////////////////////////////////////
  1959   1959   
  1960   1960               #region Private Static Data
  1961         -            private static readonly Process CurrentProcess =
  1962         -                System.Diagnostics.Process.GetCurrentProcess();
  1963         -
  1964         -            ///////////////////////////////////////////////////////////////////
  1965         -
  1966   1961               private static Assembly systemEf6Assembly;
  1967   1962               #endregion
  1968   1963   
  1969   1964               ///////////////////////////////////////////////////////////////////
  1970   1965   
  1971   1966               #region Private Data
  1972   1967               private AssemblyName coreAssemblyName;
................................................................................
  2232   2227               ///////////////////////////////////////////////////////////////////
  2233   2228   
  2234   2229               #region Public Static Methods
  2235   2230               public static void BreakIntoDebugger()
  2236   2231               {
  2237   2232                   Console.WriteLine(
  2238   2233                       "Attach a debugger to process {0} and press any key to " +
  2239         -                    "continue.", (CurrentProcess != null) ?
  2240         -                    CurrentProcess.Id.ToString() : "<unknown>");
         2234  +                    "continue.", (thisProcess != null) ?
         2235  +                    thisProcess.Id.ToString() : "<unknown>");
  2241   2236   
  2242   2237                   try
  2243   2238                   {
  2244   2239                       Console.ReadKey(true); /* throw */
  2245   2240                   }
  2246   2241                   catch (InvalidOperationException) // Console.ReadKey
  2247   2242                   {
................................................................................
  4203   4198           }
  4204   4199           #endregion
  4205   4200           #endregion
  4206   4201   
  4207   4202           ///////////////////////////////////////////////////////////////////////
  4208   4203   
  4209   4204           #region Private Constant Data
         4205  +        #region Package & Provider Names
  4210   4206           private const string CoreFileName = "System.Data.SQLite.dll";
  4211   4207           private const string LinqFileName = "System.Data.SQLite.Linq.dll";
  4212   4208           private const string Ef6FileName = "System.Data.SQLite.EF6.dll";
  4213   4209           private const string DesignerFileName = "SQLite.Designer.dll";
  4214   4210           private const string ProviderName = "SQLite Data Provider";
  4215   4211           private const string ProjectName = "System.Data.SQLite";
  4216   4212           private const string LegacyProjectName = "SQLite";
  4217   4213   
  4218   4214           ///////////////////////////////////////////////////////////////////////
  4219   4215   
  4220   4216           private const string Description =
  4221   4217               ".NET Framework Data Provider for SQLite";
         4218  +        #endregion
  4222   4219   
  4223   4220           ///////////////////////////////////////////////////////////////////////
  4224   4221   
  4225   4222           private const string CLRv2ImageRuntimeVersion = "v2.0.50727";
  4226   4223           private const string CLRv4ImageRuntimeVersion = "v4.0.30319";
  4227   4224   
  4228   4225           ///////////////////////////////////////////////////////////////////////
................................................................................
  4270   4267           private static readonly string XPathForRemoveElement =
  4271   4268               "configuration/system.data/DbProviderFactories/remove[@invariant=\"{0}\"]";
  4272   4269           #endregion
  4273   4270   
  4274   4271           ///////////////////////////////////////////////////////////////////////
  4275   4272   
  4276   4273           #region Private Static Data
         4274  +        #region Diagnostics & Logging
         4275  +        //
         4276  +        // NOTE: Cache the current process and assembly as they do not change
         4277  +        //       and may be needed in quite a few different places.
         4278  +        //
         4279  +        private static Process thisProcess = Process.GetCurrentProcess();
  4277   4280           private static Assembly thisAssembly = Assembly.GetExecutingAssembly();
  4278   4281   
         4282  +        ///////////////////////////////////////////////////////////////////////
         4283  +
         4284  +        //
         4285  +        // NOTE: The trace category is the same for both the debug and trace
         4286  +        //       callbacks.
         4287  +        //
  4279   4288           private static string traceCategory = Path.GetFileName(
  4280         -            thisAssembly.Location); /* NOTE: Same for debug and trace. */
         4289  +            (thisAssembly != null) ? thisAssembly.Location : null);
  4281   4290   
         4291  +        ///////////////////////////////////////////////////////////////////////
         4292  +
         4293  +        //
         4294  +        // NOTE: Set the debug and trace logging callbacks used by the
         4295  +        //       application.
         4296  +        //
  4282   4297           private static TraceCallback debugCallback = AppDebug;
  4283   4298           private static TraceCallback traceCallback = AppTrace;
         4299  +        #endregion
  4284   4300   
  4285   4301           ///////////////////////////////////////////////////////////////////////
  4286   4302   
         4303  +        #region System Directory
  4287   4304           private static string systemDirectory = null;
  4288   4305   
  4289   4306   #if WINDOWS
  4290   4307           private static string systemDirectoryWow64 = null;
  4291   4308   #endif
         4309  +        #endregion
  4292   4310   
  4293   4311           ///////////////////////////////////////////////////////////////////////
  4294   4312   
         4313  +        #region Registry Statistics
  4295   4314           private static int filesCreated = 0;
  4296   4315           private static int filesModified = 0;
  4297   4316           private static int filesDeleted = 0;
         4317  +        #endregion
  4298   4318           #endregion
  4299   4319   
  4300   4320           ///////////////////////////////////////////////////////////////////////
  4301   4321   
  4302   4322           #region Trace Handling
  4303   4323           private static string GetLogFileName(
  4304   4324               string typeName