コード例 #1
0
 public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IActionBehavior inner, IUrlRegistry urls)
 {
     _report = report;
     _detector = detector;
     _inner = inner;
     _urls = urls;
 }
コード例 #2
0
ファイル: RecordingOutputWriter.cs プロジェクト: KevM/fubumvc
 public RecordingOutputWriter(IDebugReport report, IDebugDetector detector, IHttpWriter inner,
     IFileSystem fileSystem)
     : base(inner, fileSystem)
 {
     _report = report;
     _detector = detector;
 }
コード例 #3
0
 public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IActionBehavior inner, IUrlRegistry urls)
 {
     _report   = report;
     _detector = detector;
     _inner    = inner;
     _urls     = urls;
 }
コード例 #4
0
 public RecordingOutputWriter(IDebugReport report, IDebugDetector detector, IHttpWriter inner,
                              IFileSystem fileSystem)
     : base(inner, fileSystem)
 {
     _report   = report;
     _detector = detector;
 }
コード例 #5
0
ファイル: DebugProcs.cs プロジェクト: bbriggs/FieldWorks
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates a new object
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public DebugProcs()
		{
#if DEBUG
			m_DebugReport = DebugReportClass.Create();
			m_DebugReport.SetSink(this);
#endif
		}
コード例 #6
0
 public void AddReport(IDebugReport report)
 {
     _reports.Enqueue(report);
     while (_reports.Count > 50)
     {
         _reports.Dequeue();
     }
 }
コード例 #7
0
 public void AddReport(IDebugReport report)
 {
     _reports.Enqueue(report);
     while (_reports.Count > 50)
     {
         _reports.Dequeue();
     }
 }
コード例 #8
0
ファイル: DebugProcs.cs プロジェクト: sillsdev/WorldPad
		/// ------------------------------------------------------------------------------------
		/// <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
		}
コード例 #9
0
ファイル: DiagnosticBehavior.cs プロジェクト: jemacom/fubumvc
        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>());
        }
コード例 #10
0
 public void AddReport(IDebugReport report)
 {
     _reports.Enqueue(report);
     while (_reports.Count > _settings.MaxRequests)
     {
         _reports.Dequeue();
     }
 }
コード例 #11
0
        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>());
        }
コード例 #12
0
        public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IUrlRegistry urls,
                                  IRequestHistoryCache history)
        {
            _report   = report;
            _detector = detector;
            _urls     = urls;

            history.AddReport(report);
        }
コード例 #13
0
        public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IUrlRegistry urls,
            IRequestHistoryCache history)
        {
            _report = report;
            _detector = detector;
            _urls = urls;

            history.AddReport(report);
        }
コード例 #14
0
ファイル: BehaviorTracer.cs プロジェクト: jemacom/fubumvc
        public BehaviorTracer(BehaviorCorrelation correlation, IDebugReport report, IDebugDetector debugDetector)
        {
            _report = report;
            _debugDetector = debugDetector;

            if (_report.BehaviorId == Guid.Empty)
            {
                _report.BehaviorId = correlation.ChainId;
            }

            _behaviorId = correlation.BehaviorId;
        }
コード例 #15
0
ファイル: BehaviorTracer.cs プロジェクト: rmueller/fubumvc
        public BehaviorTracer(BehaviorCorrelation correlation, IDebugReport report, IDebugDetector debugDetector)
        {
            _report        = report;
            _debugDetector = debugDetector;

            if (_report.BehaviorId == Guid.Empty)
            {
                _report.BehaviorId = correlation.ChainId;
            }

            _behaviorId = correlation.BehaviorId;
        }
コード例 #16
0
        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);
        }
コード例 #17
0
        // 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();
            }
        }
コード例 #18
0
        public void AddReport(IDebugReport report)
        {
            if(_filters.Any(f => f.Exclude(_request())))
            {
                return;
            }

            _reports.Enqueue(report);
            while (_reports.Count > _configuration.MaxRequests)
            {
                _reports.Dequeue();
            }
        }
コード例 #19
0
ファイル: RequestHistoryCache.cs プロジェクト: ketiko/fubumvc
        // 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();
            }
        }
コード例 #20
0
ファイル: get_Id_handler.cs プロジェクト: jemacom/fubumvc
        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;
        }
コード例 #21
0
        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);
        }
コード例 #22
0
ファイル: get_Id_handler.cs プロジェクト: pedroreys/fubumvc
        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;
        }
コード例 #23
0
 public RecordingOutputWriter(IDebugReport report, IOutputWriter inner)
 {
     _report = report;
     _inner = inner;
 }
コード例 #24
0
 public RecordingObjectResolver(IDebugReport report, ObjectResolver resolver)
 {
     _report = report;
     _resolver = resolver;
 }
コード例 #25
0
 public RecordingOutputWriter(IDebugReport report)
 {
     _report = report;
 }
コード例 #26
0
 public RecordingRequestData(IDebugReport report, AggregateDictionary dictionary)
     : base(dictionary)
 {
     _report = report;
 }
コード例 #27
0
 public RecordingOutputWriter(IDebugReport report, IOutputWriter inner)
 {
     _report = report;
     _inner  = inner;
 }
コード例 #28
0
 public RecordingAuthorizationPolicyExecutor(IDebugReport report)
 {
     _report = report;
 }
コード例 #29
0
 public DebuggingOutputWriter(IDebugDetector detector, IDebugReport report)
 {
     _inner = detector.IsDebugCall() ? (IOutputWriter) new RecordingOutputWriter(report) : new HttpResponseOutputWriter();
 }
コード例 #30
0
 public BehaviorTracer(IDebugReport report, IDebugDetector debugDetector)
 {
     _report        = report;
     _debugDetector = debugDetector;
 }
コード例 #31
0
 public RecordingOutputWriter(IDebugReport report)
 {
     _report = report;
 }
コード例 #32
0
ファイル: DebugProcs.cs プロジェクト: bbriggs/FieldWorks
		/// <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;
		}
コード例 #33
0
 public DiagnosticsDebugCallHandler(IDebugReport report, IFubuRequest request, IPartialFactory partialFactory)
 {
     _report = report;
     _partialFactory = partialFactory;
     _request = request;
 }
コード例 #34
0
 public RecordingFieldAccessRightsExecutor(IDebugReport debugReport)
 {
     _debugReport = debugReport;
 }
コード例 #35
0
 public RecordingFubuRequest(IDebugReport report, IRequestData data, IObjectResolver resolver)
     : base(data, resolver)
 {
     _report = report;
 }
コード例 #36
0
 public DebugCallHandler(IDebugReport report, IUrlRegistry urls, IOutputWriter writer)
 {
     _report = report;
     _urls   = urls;
     _writer = writer;
 }
コード例 #37
0
 public RecordingObjectResolver(IDebugReport report, ObjectResolver resolver)
 {
     _report   = report;
     _resolver = resolver;
 }
コード例 #38
0
 public RecordingAuthorizationPolicyExecutor(IDebugReport report)
 {
     _report = report;
 }
コード例 #39
0
 public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IActionBehavior inner)
 {
     _report = report;
     _detector = detector;
     _inner = inner;
 }
コード例 #40
0
 public BehaviorTracer(IDebugReport report, IDebugDetector debugDetector, IActionBehavior inner)
 {
     _report = report;
     _debugDetector = debugDetector;
     _inner = inner;
 }
コード例 #41
0
 public RecordingBindingLogger(IDebugReport report)
 {
     _report = report;
 }
コード例 #42
0
 public RecordingBindingLogger(IDebugReport report)
 {
     _report = report;
 }
コード例 #43
0
 public RecordingOutputWriter(IDebugDetector detector, IDebugReport report)
 {
     _report = report;
     _inner  = detector.IsDebugCall() ? (IOutputWriter) new NulloOutputWriter() : new HttpResponseOutputWriter();
 }
コード例 #44
0
ファイル: RequestObserver.cs プロジェクト: rmueller/fubumvc
 public RequestObserver(IDebugReport report)
 {
     _report = report;
 }
コード例 #45
0
 public RecordingRequestData(IDebugReport report, AggregateDictionary dictionary)
     : base(dictionary)
 {
     _report = report;
 }
コード例 #46
0
ファイル: DebugWriter.cs プロジェクト: joshuaflanagan/fubumvc
 public DebugWriter(IDebugReport report, IUrlRegistry urls)
 {
     _report = report;
     _urls = urls;
 }
コード例 #47
0
ファイル: DebugWriter.cs プロジェクト: shashankshetty/fubumvc
 public DebugWriter(IDebugReport report)
 {
     _report = report;
 }
コード例 #48
0
 public BehaviorTracer(IDebugReport report, IDebugDetector debugDetector, IActionBehavior inner)
 {
     _report        = report;
     _debugDetector = debugDetector;
     _inner         = inner;
 }
コード例 #49
0
 public DiagnosticsDebugCallHandler(IDebugReport report, IFubuRequest request, IPartialFactory partialFactory)
 {
     _report         = report;
     _partialFactory = partialFactory;
     _request        = request;
 }
コード例 #50
0
ファイル: RequestObserver.cs プロジェクト: jemacom/fubumvc
 public RequestObserver(IDebugReport report)
 {
     _report = report;
 }
コード例 #51
0
 public SimpleCalculator(IDebugReport debugReportResult)
 {
     DebugReportResult = debugReportResult;
 }
コード例 #52
0
 public DebuggingOutputWriter(IDebugDetector detector, IDebugReport report)
 {
     _inner = detector.IsDebugCall() ? (IOutputWriter) new RecordingOutputWriter(report) : new HttpResponseOutputWriter();
 }
コード例 #53
0
ファイル: DebugWriter.cs プロジェクト: rmueller/fubumvc
 public DebugWriter(IDebugReport report, IUrlRegistry urls)
 {
     _report = report;
     _urls   = urls;
 }
コード例 #54
0
 public DebugCallHandler(IDebugReport report, IUrlRegistry urls, IOutputWriter writer)
 {
     _report = report;
     _urls = urls;
     _writer = writer;
 }
コード例 #55
0
 public RecordingOutputWriter(IDebugDetector detector, IDebugReport report)
 {
     _report = report;
     _inner = detector.IsDebugCall() ? (IOutputWriter)new NulloOutputWriter() : new HttpResponseOutputWriter();
 }
コード例 #56
0
 public RecordingFieldAccessRightsExecutor(IDebugReport debugReport)
 {
     _debugReport = debugReport;
 }