protected override void OnStart(string[] args) { string baseDir = ConfigurationManager.AppSettings["InterlisBaseDir"]; if (baseDir == null) { throw new Exception("InterlisBaseDir not set in app.config"); } if (!System.IO.Path.IsPathRooted(baseDir)) { baseDir = System.IO.Path.Combine ( System.IO.Path.GetDirectoryName(this.GetType().Assembly.Location), System.IO.Path.GetDirectoryName(baseDir) ); } scanner = new AxisImportScanner(baseDir); scanner.Start(); }
protected override void OnStop() { scanner.Cancel(); scanner = null; }