public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IActionBehavior inner, IUrlRegistry urls) { _report = report; _detector = detector; _inner = inner; _urls = urls; }
public RecordingOutputWriter(IDebugReport report, IDebugDetector detector, IHttpWriter inner, IFileSystem fileSystem) : base(inner, fileSystem) { _report = report; _detector = detector; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Creates a new object /// </summary> /// ------------------------------------------------------------------------------------ public DebugProcs() { #if DEBUG m_DebugReport = DebugReportClass.Create(); m_DebugReport.SetSink(this); #endif }
public void AddReport(IDebugReport report) { _reports.Enqueue(report); while (_reports.Count > 50) { _reports.Dequeue(); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Creates a new object /// </summary> /// <param name="fShowAssertMsgBox"><c>true</c> to show message box on asserts, /// otherwise false</param> /// ------------------------------------------------------------------------------------ public DebugProcs(bool fShowAssertMsgBox) { #if DEBUG m_DebugReport = DebugReportClass.Create(); m_DebugReport.ShowAssertMessageBox(fShowAssertMsgBox); m_DebugReport.SetSink(this); #endif }
public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IRequestHistoryCache history, IDebugCallHandler debugCallHandler, IFubuRequest request) { _report = report; _debugCallHandler = debugCallHandler; _detector = detector; _initialize = () => history.AddReport(report, request.Get<CurrentRequest>()); }
public void AddReport(IDebugReport report) { _reports.Enqueue(report); while (_reports.Count > _settings.MaxRequests) { _reports.Dequeue(); } }
public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IRequestHistoryCache history, IDebugCallHandler debugCallHandler, IFubuRequest request) { _report = report; _debugCallHandler = debugCallHandler; _detector = detector; _initialize = () => history.AddReport(report, request.Get <CurrentRequest>()); }
public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IUrlRegistry urls, IRequestHistoryCache history) { _report = report; _detector = detector; _urls = urls; history.AddReport(report); }
public BehaviorTracer(BehaviorCorrelation correlation, IDebugReport report, IDebugDetector debugDetector) { _report = report; _debugDetector = debugDetector; if (_report.BehaviorId == Guid.Empty) { _report.BehaviorId = correlation.ChainId; } _behaviorId = correlation.BehaviorId; }
public BehaviorDetailsModel Gather(IDebugReport report) { // TODO -- come back and clean this up. Just getting it up and running for a demo BehaviorDetailsModel root = null; var behaviors = new Cache <Type, BehaviorDetailsModel>(t => { var model = new BehaviorDetailsModel { BehaviorType = t }; if (root == null) { root = model; } return(model); }); Type lastBehaviorType = null; report .Steps .Each(s => { var behaviorType = s.Behavior.BehaviorType; var isSameBehavior = behaviorType == lastBehaviorType; var isBehaviorFinish = s.Details.GetType().CanBeCastTo <BehaviorFinish>(); if (behaviors.Has(behaviorType) && (!isSameBehavior || isBehaviorFinish)) { behaviors[behaviorType].AddAfter(s.Details); } else { behaviors[behaviorType].AddBefore(s.Details); } var currentBehavior = behaviors[behaviorType]; currentBehavior.Id = s.Behavior.BehaviorId; if (lastBehaviorType != null && !isSameBehavior && isBehaviorFinish) { var lastBehavior = behaviors[lastBehaviorType]; if (!lastBehavior.Equals(root)) { currentBehavior.Inner = lastBehavior; } } lastBehaviorType = behaviorType; }); return(root); }
// TODO -- let's thin this down from CurrentRequest public void AddReport(IDebugReport report, CurrentRequest request) { if (_filters.Any(f => f.Exclude(request))) { return; } _reports.Enqueue(report); while (_reports.Count > _configuration.MaxRequests) { _reports.Dequeue(); } }
public void AddReport(IDebugReport report) { if(_filters.Any(f => f.Exclude(_request()))) { return; } _reports.Enqueue(report); while (_reports.Count > _configuration.MaxRequests) { _reports.Dequeue(); } }
// TODO -- let's thin this down from CurrentRequest public void AddReport(IDebugReport report, CurrentRequest request) { if(_filters.Any(f => f.Exclude(request))) { return; } _reports.Enqueue(report); while (_reports.Count > _settings.MaxRequests) { _reports.Dequeue(); } }
public BehaviorDetailsModel Gather(IDebugReport report) { // TODO -- come back and clean this up. Just getting it up and running for a demo BehaviorDetailsModel root = null; var behaviors = new Cache<Type, BehaviorDetailsModel>(t => { var model = new BehaviorDetailsModel {BehaviorType = t}; if(root == null) { root = model; } return model; }); Type lastBehaviorType = null; report .Steps .Each(s => { var behaviorType = s.Behavior.BehaviorType; var isSameBehavior = behaviorType == lastBehaviorType; var isBehaviorFinish = s.Details.GetType().CanBeCastTo<BehaviorFinish>(); if (behaviors.Has(behaviorType) && (!isSameBehavior || isBehaviorFinish)) { behaviors[behaviorType].AddAfter(s.Details); } else { behaviors[behaviorType].AddBefore(s.Details); } var currentBehavior = behaviors[behaviorType]; currentBehavior.Id = s.Behavior.BehaviorId; if (lastBehaviorType != null && !isSameBehavior && isBehaviorFinish) { var lastBehavior = behaviors[lastBehaviorType]; if(!lastBehavior.Equals(root)) { currentBehavior.Inner = lastBehavior; } } lastBehaviorType = behaviorType; }); return root; }
public BehaviorDetailsModel Gather(IDebugReport report) { // TODO -- come back and clean this up. Just getting it up and running for a demo BehaviorDetailsModel root = null; var behaviors = new Cache <Type, BehaviorDetailsModel>(t => { var model = new BehaviorDetailsModel { BehaviorType = t }; if (root == null) { root = model; } return(model); }); Type lastBehavior = null; report .Steps .Each(s => { var behaviorType = s.Behavior.BehaviorType; if (behaviors.Has(behaviorType) && behaviorType != lastBehavior) { behaviors[behaviorType].AddAfter(s.Details); } else { behaviors[behaviorType].AddBefore(s.Details); } if (lastBehavior != null && behaviorType != lastBehavior) { var lastModel = behaviors[lastBehavior]; if (!lastModel.Equals(root)) { behaviors[behaviorType].Inner = lastModel; } } lastBehavior = behaviorType; }); return(root); }
public BehaviorDetailsModel Gather(IDebugReport report) { // TODO -- come back and clean this up. Just getting it up and running for a demo BehaviorDetailsModel root = null; var behaviors = new Cache<Type, BehaviorDetailsModel>(t => { var model = new BehaviorDetailsModel {BehaviorType = t}; if(root == null) { root = model; } return model; }); Type lastBehavior = null; report .Steps .Each(s => { var behaviorType = s.Behavior.BehaviorType; if(behaviors.Has(behaviorType) && behaviorType != lastBehavior) { behaviors[behaviorType].AddAfter(s.Details); } else { behaviors[behaviorType].AddBefore(s.Details); } if(lastBehavior != null && behaviorType != lastBehavior) { var lastModel = behaviors[lastBehavior]; if(!lastModel.Equals(root)) { behaviors[behaviorType].Inner = lastModel; } } lastBehavior = behaviorType; }); return root; }
public RecordingOutputWriter(IDebugReport report, IOutputWriter inner) { _report = report; _inner = inner; }
public RecordingObjectResolver(IDebugReport report, ObjectResolver resolver) { _report = report; _resolver = resolver; }
public RecordingOutputWriter(IDebugReport report) { _report = report; }
public RecordingRequestData(IDebugReport report, AggregateDictionary dictionary) : base(dictionary) { _report = report; }
public RecordingAuthorizationPolicyExecutor(IDebugReport report) { _report = report; }
public DebuggingOutputWriter(IDebugDetector detector, IDebugReport report) { _inner = detector.IsDebugCall() ? (IOutputWriter) new RecordingOutputWriter(report) : new HttpResponseOutputWriter(); }
public BehaviorTracer(IDebugReport report, IDebugDetector debugDetector) { _report = report; _debugDetector = debugDetector; }
/// <summary> /// Executes in two distinct scenarios. /// /// 1. If disposing is true, the method has been called directly /// or indirectly by a user's code via the Dispose method. /// Both managed and unmanaged resources can be disposed. /// /// 2. If disposing is false, the method has been called by the /// runtime from inside the finalizer and you should not reference (access) /// other managed objects, as they already have been garbage collected. /// Only unmanaged resources can be disposed. /// </summary> /// <param name="disposing"></param> /// <remarks> /// If any exceptions are thrown, that is fine. /// If the method is being done in a finalizer, it will be ignored. /// If it is thrown by client code calling Dispose, /// it needs to be handled by fixing the bug. /// /// If subclasses override this method, they should call the base implementation. /// </remarks> protected virtual void Dispose(bool disposing) { Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** "); // Must not be run more than once. if (IsDisposed) return; if (disposing) { // Dispose managed resources here. #if DEBUG if (m_DebugReport != null) m_DebugReport.ClearSink(); #endif } // Dispose unmanaged resources here, whether disposing is true or false. #if DEBUG if (m_DebugReport != null) { //m_DebugReport.ClearSink(); Marshal.ReleaseComObject(m_DebugReport); m_DebugReport = null; } #endif IsDisposed = true; }
public DiagnosticsDebugCallHandler(IDebugReport report, IFubuRequest request, IPartialFactory partialFactory) { _report = report; _partialFactory = partialFactory; _request = request; }
public RecordingFieldAccessRightsExecutor(IDebugReport debugReport) { _debugReport = debugReport; }
public RecordingFubuRequest(IDebugReport report, IRequestData data, IObjectResolver resolver) : base(data, resolver) { _report = report; }
public DebugCallHandler(IDebugReport report, IUrlRegistry urls, IOutputWriter writer) { _report = report; _urls = urls; _writer = writer; }
public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IActionBehavior inner) { _report = report; _detector = detector; _inner = inner; }
public BehaviorTracer(IDebugReport report, IDebugDetector debugDetector, IActionBehavior inner) { _report = report; _debugDetector = debugDetector; _inner = inner; }
public RecordingBindingLogger(IDebugReport report) { _report = report; }
public RecordingOutputWriter(IDebugDetector detector, IDebugReport report) { _report = report; _inner = detector.IsDebugCall() ? (IOutputWriter) new NulloOutputWriter() : new HttpResponseOutputWriter(); }
public RequestObserver(IDebugReport report) { _report = report; }
public DebugWriter(IDebugReport report, IUrlRegistry urls) { _report = report; _urls = urls; }
public DebugWriter(IDebugReport report) { _report = report; }
public SimpleCalculator(IDebugReport debugReportResult) { DebugReportResult = debugReportResult; }
public RecordingOutputWriter(IDebugDetector detector, IDebugReport report) { _report = report; _inner = detector.IsDebugCall() ? (IOutputWriter)new NulloOutputWriter() : new HttpResponseOutputWriter(); }