コード例 #1
0
 protected override void ProcessRecord()
 {
     var performanceCounterSetup = new PerformanceCounterSetup(Host);
     if (performanceCounterSetup.DoesCategoryExist())
     {
         performanceCounterSetup.DeleteCategory();
     }
     else
     {
         WriteWarning("NServiceBus Performance Counters were not installed");
     }
 }
        protected override void ProcessRecord()
        {
            var performanceCounterSetup = new PerformanceCounterSetup(Host);

            if (performanceCounterSetup.DoesCategoryExist())
            {
                performanceCounterSetup.DeleteCategory();
            }
            else
            {
                WriteWarning("NServiceBus Performance Counters were not installed");
            }
        }
コード例 #3
0
 void ForceCreate()
 {
     var setup = new PerformanceCounterSetup(Host);
     try
     {
        setup.DeleteCategory();
     }
     catch (Exception exception)
     {
         var errorRecord = new ErrorRecord(exception, "FailedToDeleteCategory", ErrorCategory.NotSpecified, null);
         ThrowTerminatingError(errorRecord);
     }
     setup.SetupCounters();
 }
コード例 #4
0
        void ForceCreate()
        {
            var setup = new PerformanceCounterSetup(Host);

            try
            {
                setup.DeleteCategory();
            }
            catch (Exception exception)
            {
                var errorRecord = new ErrorRecord(exception, "FailedToDeleteCategory", ErrorCategory.NotSpecified, null);
                ThrowTerminatingError(errorRecord);
            }
            setup.SetupCounters();
        }
コード例 #5
0
 void ForceCreate()
 {
     try
     {
         Host.UI.WriteLine("Deleting counters");
         PerformanceCounterSetup.DeleteCategory();
     }
     catch (Exception exception)
     {
         var errorRecord = new ErrorRecord(exception, "FailedToDeleteCategory", ErrorCategory.NotSpecified, null);
         ThrowTerminatingError(errorRecord);
     }
     Host.UI.WriteLine("Creating counters");
     PerformanceCounterSetup.SetupCounters();
 }