public override void ReadData(SerializedObject objSerializedObject) { base.ReadData(objSerializedObject); Name = objSerializedObject.Values.GetValue <string>("Name", string.Empty); _objTasks = objSerializedObject.Objects.GetObject <ITaskList>("Tasks", null); if (_objTasks == null) { _objTasks = new ITaskList(); } Status = objSerializedObject.Values.GetValue <JobStatusType>("Status", JobStatusType.Queued); /// Create an ManualResetEvent for each of the job statuses that are currently /// defined. We will use these to signal threads whenever a particular status /// has been set. /// _objWaitForStatusEvents = new Dictionary <JobStatusType, ManualResetEvent>(); foreach (JobStatusType enuJobStatus in Enum.GetValues(typeof(JobStatusType))) { _objWaitForStatusEvents.Add(enuJobStatus, new ManualResetEvent(false)); } _objStartThread = null; _objPauseEvent = new ManualResetEvent(true); }
public override void ReadData(BinaryReaderExtension objBinaryReader) { base.ReadData(objBinaryReader); _strName = objBinaryReader.ReadString(); _enuStatus = (JobStatusType)objBinaryReader.ReadByte(); _objTasks = objBinaryReader.ReadTransportableObject <ITaskList>(); }
public Job(string strName, IEnumerable <ITask> objTasks) : base() { Name = strName; _objTasks = new ITaskList(objTasks); }