コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }