Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }