示例#1
0
		public void AddTask(Task task)
		{
			task.Validate();

			task.ID = _nextTaskID++;

			// we must use PrevalenceEngine.Now as our clock
			// if we want our system to be deterministic
			//
			task.DateCreated = PrevalenceEngine.Now;

			_tasks.Add(task.ID, task);
		}
		private void AddTask()
		{
			WriteLine("\n\tAdd Task");			

			Task task = new Task();
			task.Summary = Prompt("Summary: ");

			_system.AddTask(task);
		}