diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-01-20 19:32:53 +0400 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@xamarin.com> | 2014-10-21 18:39:14 +0400 |
commit | f73b2a9990495587d514aa1856919c21170a3940 (patch) | |
tree | 9842411ee8644ead5915a715ee7e53984a601df4 /main/src/addins/NUnit/Services/NUnitAssemblyTestSuite.cs | |
parent | a2046b6331a271e8203df7d3d0f14500d33d60fa (diff) |
Initial drop of the new project model
Diffstat (limited to 'main/src/addins/NUnit/Services/NUnitAssemblyTestSuite.cs')
-rw-r--r-- | main/src/addins/NUnit/Services/NUnitAssemblyTestSuite.cs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/main/src/addins/NUnit/Services/NUnitAssemblyTestSuite.cs b/main/src/addins/NUnit/Services/NUnitAssemblyTestSuite.cs index 3e55a824be..895b07674d 100644 --- a/main/src/addins/NUnit/Services/NUnitAssemblyTestSuite.cs +++ b/main/src/addins/NUnit/Services/NUnitAssemblyTestSuite.cs @@ -45,6 +45,7 @@ using MonoDevelop.Ide; using System.Xml.Linq; using System.Linq; using System.Globalization; +using System.Threading.Tasks; namespace MonoDevelop.NUnit { @@ -69,7 +70,7 @@ namespace MonoDevelop.NUnit { } - public NUnitAssemblyTestSuite (string name, SolutionItem ownerSolutionItem): base (name, ownerSolutionItem) + public NUnitAssemblyTestSuite (string name, WorkspaceObject ownerSolutionItem): base (name, ownerSolutionItem) { } @@ -145,10 +146,9 @@ namespace MonoDevelop.NUnit } } - public override IAsyncOperation Refresh () + public override Task Refresh (CancellationToken ct) { - AsyncOperation oper = new AsyncOperation (); - System.Threading.ThreadPool.QueueUserWorkItem (delegate { + return Task.Factory.StartNew (delegate { lock (locker) { try { while (Status == TestStatus.Loading) { @@ -162,13 +162,10 @@ namespace MonoDevelop.NUnit Monitor.Wait (locker); } } - oper.SetCompleted (true); } catch { - oper.SetCompleted (false); } } }); - return oper; } DateTime GetAssemblyTime () |