Index: tools/install/Installer.cs ================================================================== --- tools/install/Installer.cs +++ tools/install/Installer.cs @@ -1956,15 +1956,10 @@ #endregion /////////////////////////////////////////////////////////////////// #region Private Static Data - private static readonly Process CurrentProcess = - System.Diagnostics.Process.GetCurrentProcess(); - - /////////////////////////////////////////////////////////////////// - private static Assembly systemEf6Assembly; #endregion /////////////////////////////////////////////////////////////////// @@ -2234,12 +2229,12 @@ #region Public Static Methods public static void BreakIntoDebugger() { Console.WriteLine( "Attach a debugger to process {0} and press any key to " + - "continue.", (CurrentProcess != null) ? - CurrentProcess.Id.ToString() : ""); + "continue.", (thisProcess != null) ? + thisProcess.Id.ToString() : ""); try { Console.ReadKey(true); /* throw */ } @@ -4205,10 +4200,11 @@ #endregion /////////////////////////////////////////////////////////////////////// #region Private Constant Data + #region Package & Provider Names private const string CoreFileName = "System.Data.SQLite.dll"; private const string LinqFileName = "System.Data.SQLite.Linq.dll"; private const string Ef6FileName = "System.Data.SQLite.EF6.dll"; private const string DesignerFileName = "SQLite.Designer.dll"; private const string ProviderName = "SQLite Data Provider"; @@ -4217,10 +4213,11 @@ /////////////////////////////////////////////////////////////////////// private const string Description = ".NET Framework Data Provider for SQLite"; + #endregion /////////////////////////////////////////////////////////////////////// private const string CLRv2ImageRuntimeVersion = "v2.0.50727"; private const string CLRv4ImageRuntimeVersion = "v4.0.30319"; @@ -4272,31 +4269,54 @@ #endregion /////////////////////////////////////////////////////////////////////// #region Private Static Data + #region Diagnostics & Logging + // + // NOTE: Cache the current process and assembly as they do not change + // and may be needed in quite a few different places. + // + private static Process thisProcess = Process.GetCurrentProcess(); private static Assembly thisAssembly = Assembly.GetExecutingAssembly(); + /////////////////////////////////////////////////////////////////////// + + // + // NOTE: The trace category is the same for both the debug and trace + // callbacks. + // private static string traceCategory = Path.GetFileName( - thisAssembly.Location); /* NOTE: Same for debug and trace. */ + (thisAssembly != null) ? thisAssembly.Location : null); + /////////////////////////////////////////////////////////////////////// + + // + // NOTE: Set the debug and trace logging callbacks used by the + // application. + // private static TraceCallback debugCallback = AppDebug; private static TraceCallback traceCallback = AppTrace; + #endregion /////////////////////////////////////////////////////////////////////// + #region System Directory private static string systemDirectory = null; #if WINDOWS private static string systemDirectoryWow64 = null; #endif + #endregion /////////////////////////////////////////////////////////////////////// + #region Registry Statistics private static int filesCreated = 0; private static int filesModified = 0; private static int filesDeleted = 0; + #endregion #endregion /////////////////////////////////////////////////////////////////////// #region Trace Handling