private void WriteRegisteredWatches(InvokerConfig config, IDictionary <Watch, Process> running)
        {
            foreach (var watch in config.Watches)
            {
                var pid     = running.ContainsKey(watch) ? running[watch].Id : (int?)null;
                var binding = string.Empty;

                if (pid.HasValue)
                {
                    binding = watch.Environment.ContainsKey("ASPNETCORE_URLS") ? watch.Environment["ASPNETCORE_URLS"] : string.Empty;
                }

                WriteTabularOutput(
                    ColWidths,
                    config.Watches.IndexOf(watch),
                    watch.Type,
                    watch.Path,
                    new FormattedOutput {
                    PreFormat  = () => Console.ForegroundColor = running.ContainsKey(watch) ? ConsoleColor.Green : ConsoleColor.Red,
                    Text       = (running.ContainsKey(watch) ? "Running:" : "Stopped"),
                    PostFormat = () => Console.ForegroundColor = ConsoleColor.White
                },
                    pid.HasValue ? running[watch].Id.ToString() : string.Empty,
                    binding,
                    pid.HasValue ? running[watch].StartTime.ToString("MM/dd hh:mm:ss") : string.Empty);
            }
        }
 public void Update(InvokerConfig config, IDictionary <Watch, Process> running)
 {
     ScaffoldFrame();
     WriteRegisteredWatches(config, running);
 }