コード例 #1
0
        public void Start()
        {
            if (!IConfigurationStore.GetByType <WebPageConfig>().EnableThreadPage)
            {
                return;
            }

            this.Page = IApiPage.Create("Thread CPU Usage", Color.Aqua, IConfigurationStore.GetByType <WebPageConfig>().ThreadPageHandle);
            var tmr = new System.Timers.Timer(1000)
            {
                AutoReset = true
            };

            tmr.Elapsed += Tick;
            tmr.Start();
        }
コード例 #2
0
        public void Start()
        {
            if (!IConfigurationStore.GetByType <WebPageConfig>().EnableExceptionsPage)
            {
                return;
            }
            AppDomain.CurrentDomain.FirstChanceException += OnException;
            this.Page = IApiPage.Create(
                "Exceptions / second", Color.Red, IConfigurationStore.GetByType <WebPageConfig>().ExceptionsPageHandle);
            var tmr = new Timer(1000)
            {
                AutoReset = true
            };

            tmr.Elapsed += Tick;
            tmr.Start();
        }