protected override void invoke(Action action) { _trace.Start(); try { action(); } catch (Exception ex) { _trace.MarkAsFailedRequest(); if (!_exceptionObserver.WasObserved(ex)) { _trace.Log(new ExceptionReport("Request failed", ex)); _exceptionObserver.RecordHandled(ex); } throw; } finally { _trace.MarkFinished(); if (_detector.IsDebugCall()) { _writer.RedirectToUrl(_trace.LogUrl); } } }
private void write() { if (!_detector.IsDebugCall()) { return; } _report.MarkFinished(); var debugWriter = new DebugWriter(_report, _urls); var outputWriter = new HttpResponseOutputWriter(); outputWriter.Write(MimeType.Html.ToString(), debugWriter.Write().ToString()); }
private void write() { _report.MarkFinished(); if (!_detector.IsDebugCall()) { return; } _detector.UnlatchWriting(); _debugCallHandler.Handle(); }
private void invoke(Action action) { _report.StartBehavior(_inner); try { action(); } catch (Exception ex) { _report.MarkException(ex); if (!_debugDetector.IsDebugCall()) { throw; } } _report.EndBehavior(); }
public RecordingOutputWriter(IDebugDetector detector, IDebugReport report) { _report = report; _inner = detector.IsDebugCall() ? (IOutputWriter)new NulloOutputWriter() : new HttpResponseOutputWriter(); }
public DebuggingOutputWriter(IDebugDetector detector, IDebugReport report) { _inner = detector.IsDebugCall() ? (IOutputWriter) new RecordingOutputWriter(report) : new HttpResponseOutputWriter(); }
public RecordingOutputWriter(IDebugDetector detector, IDebugReport report) { _report = report; _inner = detector.IsDebugCall() ? (IOutputWriter) new NulloOutputWriter() : new HttpResponseOutputWriter(); }