// constructor method for the class that saves the constructor parameters
        public WorkerThread(WorkerInstance workerInstance, WorkerThreadFormatter workerThreadFormatter)
        {
            // save the constructor references
            this.workerInstance = workerInstance;
            threadDefinition    = workerThreadFormatter;
            threadName          = "Thread " + threadDefinition.ThreadNumber.ToString();

            // define the perfmon counter instance descriptions
            perfCounterServiceName = MSMQListner.PerformanceCounterTotal;
            perfCounterWorkerName  = threadDefinition.ProcessName;
            perfCounterThreadName  = threadDefinition.ProcessName + "_" + threadDefinition.ThreadNumber.ToString();

            // indicate the thread is not running
            workerRunning = false;
            workerPaused  = false;
        }
Beispiel #2
0
 // calls the base class constructor
 public WorkerThreadDerived(WorkerInstance workerInstance, WorkerThreadFormatter workerThreadFormatter)
     : base(workerInstance, workerThreadFormatter)
 {
 }