Exemple #1
0
        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();
        }
Exemple #2
0
 protected override void OnStop()
 {
     scanner.Cancel();
     scanner = null;
 }