예제 #1
0
 private void SafelyDisposeProcess(ActivityHostProcess process)
 {
     process.Finished       -= new EventHandler(this.ProcessFinished);
     process.ProcessCrashed -= new EventHandler <ActivityHostCrashedEventArgs>(this.ProcessCrashed);
     process.OnProcessIdle  -= new EventHandler(this.ProcessIdle);
     process.Dispose();
     this._hostProcesses.Remove(process);
     PSOutOfProcessActivityController.PerfCountersMgr.UpdateCounterByValue(PSWorkflowPerformanceCounterSetInfo.CounterSetId, 23, (long)-1, true);
 }
        /// <summary>
        /// Unregisters all wait handles and disposes a process
        /// </summary>
        /// <param name="process"></param>
        private void SafelyDisposeProcess(ActivityHostProcess process)
        {
            process.Finished       -= ProcessFinished;
            process.ProcessCrashed -= ProcessCrashed;
            process.OnProcessIdle  -= ProcessIdle;

            process.Dispose();

            _hostProcesses.Remove(process);

            PerfCountersMgr.UpdateCounterByValue(
                PSWorkflowPerformanceCounterSetInfo.CounterSetId,
                PSWorkflowPerformanceCounterIds.ActivityHostMgrProcessesPoolSize,
                -1);
        }
예제 #3
0
        /// <summary>
        /// Unregisters all wait handles and disposes a process
        /// </summary>
        /// <param name="process"></param>
        private void SafelyDisposeProcess(ActivityHostProcess process)
        {
            process.Finished -= ProcessFinished;
            process.ProcessCrashed -= ProcessCrashed;
            process.OnProcessIdle -= ProcessIdle;

            process.Dispose();

            _hostProcesses.Remove(process);

            PerfCountersMgr.UpdateCounterByValue(
                    PSWorkflowPerformanceCounterSetInfo.CounterSetId,
                    PSWorkflowPerformanceCounterIds.ActivityHostMgrProcessesPoolSize,
                    -1);
        }
		private void SafelyDisposeProcess(ActivityHostProcess process)
		{
			process.Finished -= new EventHandler(this.ProcessFinished);
			process.ProcessCrashed -= new EventHandler<ActivityHostCrashedEventArgs>(this.ProcessCrashed);
			process.OnProcessIdle -= new EventHandler(this.ProcessIdle);
			process.Dispose();
			this._hostProcesses.Remove(process);
			PSOutOfProcessActivityController.PerfCountersMgr.UpdateCounterByValue(PSWorkflowPerformanceCounterSetInfo.CounterSetId, 23, (long)-1, true);
		}