diff options
author | therzok <marius.ungureanu@xamarin.com> | 2019-06-27 04:26:18 +0300 |
---|---|---|
committer | therzok <marius.ungureanu@xamarin.com> | 2019-07-06 22:17:15 +0300 |
commit | 5bf153161256f11d909ca58da7beeb4d3177bbf2 (patch) | |
tree | 394f059f47af93b4878f80de5cfe26eecdbb8a5e /main/src/addins/MonoDevelop.UnitTesting | |
parent | 7fbef70336e0c9166130cd2ffb1426c75bf24ac6 (diff) |
Simplify some usages of CancellationTokenSource
Diffstat (limited to 'main/src/addins/MonoDevelop.UnitTesting')
-rw-r--r-- | main/src/addins/MonoDevelop.UnitTesting/Services/UnitTestProjectServiceExtension.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTestProjectServiceExtension.cs b/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTestProjectServiceExtension.cs index edfcaaf09d..af94020210 100644 --- a/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTestProjectServiceExtension.cs +++ b/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTestProjectServiceExtension.cs @@ -97,8 +97,7 @@ namespace MonoDevelop.UnitTesting // The user selected to run the tests UnitTest test = FindRootTest (); if (test != null) { - var cs = new CancellationTokenSource (); - using (monitor.CancellationToken.Register (cs.Cancel)) + using (var cs = CancellationTokenSource.CreateLinkedTokenSource (monitor.CancellationToken, CancellationToken.None)) await UnitTestService.RunTest (test, context, false, false, cs); } } else |