public void GetMonitorsIndex(IResponse response, [Inject("Debugger.WebMonitor.Monitor.IndexMonitor")] IEnumerable <string> indexShow, MonitorStore monitorStore) { var outputs = new GetMonitors(); if (indexShow != null) { foreach (var monitor in indexShow) { var result = monitorStore.FindMoitor(monitor); if (result != null) { outputs.WriteLine(result); } } } response.SetContext(outputs); }
public void GetMonitorsIndex(IRequest request, IResponse response, [Inject("DebuggerProvider.IndexMonitor")] IEnumerable <string> indexShow, MonitorStore monitorStore) { var outputs = new GetMonitors(); Action action = () => { if (indexShow != null) { foreach (var monitor in indexShow) { var result = monitorStore.FindMoitor(monitor); if (result != null) { outputs.WriteLine(result); } } } response.SetContext(outputs); }; CallMainThread(request, action); }