Skip to content

Commit cb9f78f

Browse files
committed
#469 #477 allow the ReadTracePostprocessing.sql script to be added to dictionary (to be set)
1 parent 26178db commit cb9f78f

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

NexusInterfaces/Classes.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ public static String GetReadTracePath()
9898
if (File.Exists (ReadTracePath + @"\reporter.exe"))
9999
{
100100
info= FileVersionInfo.GetVersionInfo(ReadTracePath + @"\reporter.exe");
101-
Util.Logger.LogMessage ("readtrace.exe file version " + info.FileVersion);
101+
Util.Logger.LogMessage ("Reporter.exe file version " + info.FileVersion);
102102
}
103103
else
104-
Util.Logger.LogMessage ("Warning: readtrace.exe doesn't exist in directory : " + ReadTracePath);
104+
Util.Logger.LogMessage ("Warning: Reporter.exe doesn't exist in directory : " + ReadTracePath);
105105

106106

107107

ReadTraceNexusImporter/ReadTraceNexusImporter.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ public class ReadTraceNexusImporter : INexusImporter, INexusProgressReporter
6969
private bool canceled = false; // Will be set to true if the current import has been canceled
7070
private string readTracePath;
7171

72+
// Add backing field with default empty array (place near other private members)
73+
private string[] _postScripts = new string[0];
74+
7275
/// <summary>Default ctor</summary>
7376
/// <remarks>Define the options that we expose to host framework, and try to find ReadTrace.exe.</remarks>
7477
public ReadTraceNexusImporter()
@@ -490,6 +493,9 @@ public void Initialize(string Filemask, string connString, string Server, bool U
490493
knownRowsets = new ArrayList();
491494
this.totalLinesProcessed = 0;
492495
this.totalRowsInserted = 0;
496+
497+
// Define post-processing scripts by adding to the postscripts array
498+
this.PostScripts = new[] { "ReadTracePostProcessing.sql" };
493499
if (null == this.readTracePath)
494500
FindReadTraceExe();
495501
Util.Logger.LogMessage(@"ReadTrace.exe Path: " + (null == this.readTracePath ? "(NOT FOUND)" : this.readTracePath));
@@ -522,14 +528,12 @@ public System.Windows.Forms.Form OptionsDialog
522528
/// <summary>Post-import .SQL scripts</summary>
523529
/// <remarks>Scripts must be present in the host .exe's directory</remarks>
524530
public string[] PostScripts
525-
{ // No scripts needed by this importer
526-
get
531+
{
532+
get { return _postScripts; }
533+
set
527534
{
528-
if (HasPostScript == true)
529-
return new string[] { POST_LOAD_SQL_SCRIPT };
530-
else
531-
return new string[0];
532-
535+
_postScripts = value ?? new string[0];
536+
HasPostScript = _postScripts != null && _postScripts.Length > 0;
533537
}
534538
}
535539

0 commit comments

Comments
 (0)