[tasque] Implement CreateTask method



commit d06f70b89b70b0af69f02e7406983d9b6d3fab58
Author: Antonius Riha <antoniusriha gmail com>
Date:   Wed Mar 20 07:47:08 2013 +0100

    Implement CreateTask method

 src/libtasque/Core/Impl/TaskList.cs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/libtasque/Core/Impl/TaskList.cs b/src/libtasque/Core/Impl/TaskList.cs
index a982663..440b81a 100644
--- a/src/libtasque/Core/Impl/TaskList.cs
+++ b/src/libtasque/Core/Impl/TaskList.cs
@@ -155,7 +155,10 @@ namespace Tasque.Core.Impl
                /// </param>
                public ITask CreateTask (string text)
                {
-                       throw new NotImplementedException ();
+                       ThrowIfIsReadOnly ();
+                       var task = new Task (text, taskRepo, noteRepo);
+                       Tasks.Add (task);
+                       return task;
                }
 
                public void Add (ITask item)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]