BlueCollar.Console.Program.BootstrapsApplicationFilesChanged C# (CSharp) Method

BootstrapsApplicationFilesChanged() private static method

Raises the bootstraps' ApplicationFilesChanged event.
private static BootstrapsApplicationFilesChanged ( object sender, FileSystemEventArgs e ) : void
sender object The event sender.
e System.IO.FileSystemEventArgs The event arguments.
return void
        private static void BootstrapsApplicationFilesChanged(object sender, FileSystemEventArgs e)
        {
            logger.Info("A change was detected in '{0}'. Shutting down.", e.FullPath);

            lock (Locker)
            {
                if (bootstraps != null)
                {
                    bootstraps.Pushdown(false);
                    bootstraps.Dispose();
                    bootstraps = null;
                }
            }

            logger.Info("Re-starting the application at '{0}'.", options.ApplicationPath);
            PullupBootstraps();
        }