// 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; }
// calls the base class constructor public WorkerThreadDerived(WorkerInstance workerInstance, WorkerThreadFormatter workerThreadFormatter) : base(workerInstance, workerThreadFormatter) { }