Пример #1
0
		public AddTaskCommand(Task task)
		{
			if (null == task)
			{
				throw new ArgumentNullException("task");
			}

			_task = task;
		}
Пример #2
0
		internal System.Collections.IList GetAllTasks()
		{
			// if we wanted our task system to
			// be more robust we could return
			// clones of the tasks objects instead of
			// returning the original references.
			// Right now I prefer
			// to trust the UI developers and
			// assume they won't be changing the
			// objects behind our back. 
			// If you have comments/suggestions
			// please drop me an email at
			// [email protected].
			Task[] tasks = new Task[_tasks.Count];
			_tasks.Values.CopyTo(tasks, 0);
			return tasks;
		}
Пример #3
0
		internal long AddTask(Task task)
		{
			task.Initialize(_nextTaskID++, PrevalenceEngine.Now);			
			_tasks[task.ID] = task;
			return task.ID;
		}