/// <summary> /// constructor passing in four parameters /// </summary> /// <param name="id">id parameter</param> /// <param name="pcQueue">parameter for IPCQueue</param> /// <param name="configFile">parameter for ConfigData</param> /// <param name="IOhandler">paraemter for IConstituencyFileReader</param> public Producer(string id, IPCQueue pcQueue, ConfigData configFile, IConstituencyFileReader IOhandler) { this.id = id; finished = false; // Initially not finished this.pcQueue = pcQueue; //counter = 0; // Initial value for the work item counter] this.configFile = configFile; this.IOhandler = IOhandler; (T = new Thread(run)).Start(); // Create a new thread for this producer and get it started RunningThreads++; // Increment the number of running producer threads; }
public FormsBasedUI(IConstituencyFileReader IOhandler) { InitializeComponent(); this.IOhandler = IOhandler; }
} // Result of the work, when null indicates that the work has not yet // been completed, note this is a read-only property public Work(ConfigRecord data, IConstituencyFileReader IOhandler) //extra param for IconstituencyIO { constituency = null; // Result of the work is initially null, this shows that the work has not yet been completed this.configRecord = data; // Data is initialised when the work is instantiated this.IOhandler = IOhandler; }