Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/guiunit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan McGovern <alan@xamarin.com>2015-02-11 20:22:22 +0300
committerAlan McGovern <alan@xamarin.com>2015-02-11 20:23:03 +0300
commita28666e5555990c7b76fe0d5d520c095fb5d4665 (patch)
tree1ee9d9de8396f8f259c68ebfd2869873a93191e7
parente6ce4d81067b8b9085947f16bd0236636ad91813 (diff)
Add the ability to run cleanup just before shutdown
Such a hack :)
-rw-r--r--src/framework/GuiUnit/TestRunner.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/framework/GuiUnit/TestRunner.cs b/src/framework/GuiUnit/TestRunner.cs
index 9ffe523..8e8e2c5 100644
--- a/src/framework/GuiUnit/TestRunner.cs
+++ b/src/framework/GuiUnit/TestRunner.cs
@@ -41,6 +41,7 @@ namespace GuiUnit
static int ExitCode = 0;
static bool initialized = false;
static IMainLoopIntegration mainLoop;
+ public static event EventHandler BeforeShutdown;
static TestRunner ()
{
@@ -264,6 +265,8 @@ namespace GuiUnit
// Run the shutdown method on the main thread
var helper = new InvokerHelper {
Func = () => {
+ if (BeforeShutdown != null)
+ BeforeShutdown (null, EventArgs.Empty);
MainLoop.Shutdown ();
return null;
}