@@ -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