public ChainModel Execute(ChainRequest request) { var visualizer = _visualizer.VisualizerFor(request.Id); if (visualizer == null) { throw new ArgumentException("{0} does not exist".ToFormat(request.Id)); } return(visualizer); }
public RequestDetailsModel Execute(RecordedRequestRequestModel request) { var report = _requestCache.RecentReports().SingleOrDefault(r => r.Id == request.Id); if (report == null) { throw new ArgumentException("{0} does not exist".ToFormat(request.Id)); } var model = new RequestDetailsModel { Report = report, Root = Gather(report), Chain = _chainVisualizer.VisualizerFor(report.BehaviorId), Logs = report .Steps .Where(s => s.Details is RequestLogEntry) .Select(s => s.Details) .Cast <RequestLogEntry>() .ToList() }; return(model); }