aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/RemoteActions
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/RemoteActions')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/RemoteActions/DefaultRemoteActionsService.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/RemoteActions/DefaultRemoteActionsService.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/RemoteActions/DefaultRemoteActionsService.cs
index 1b8780f91..4bd632a2f 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/RemoteActions/DefaultRemoteActionsService.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/RemoteActions/DefaultRemoteActionsService.cs
@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using Tango.Core.DI;
using Tango.Core.Threading;
using Tango.Integration.ExternalBridge;
+using Tango.PPC.Common.Application;
using Tango.PPC.Common.ExternalBridge;
using Tango.PPC.Common.RemoteActions;
using Tango.PPC.Common.Threading;
@@ -20,6 +21,9 @@ namespace Tango.PPC.UI.RemoteActions
[TangoInject]
private IDispatcherProvider DispatcherProvider { get; set; }
+ [TangoInject]
+ private IPPCApplicationManager ApplicationManager { get; set; }
+
public DefaultRemoteActionsService(IPPCExternalBridgeService externalBridge)
{
externalBridge.RegisterRequestHandler(this);
@@ -50,5 +54,16 @@ namespace Tango.PPC.UI.RemoteActions
}
});
}
+
+ [ExternalBridgeRequestHandlerMethod(typeof(RestartApplicationRequest), RequestHandlerLoggingMode.LogRequestName)]
+ public async Task OnRestartApplicationRequest(RestartApplicationRequest request, String token, ExternalBridgeReceiver receiver)
+ {
+ await receiver.SendGenericResponse(new RestartApplicationResponse(), token);
+
+ DispatcherProvider.Invoke(() =>
+ {
+ ApplicationManager.Restart();
+ });
+ }
}
}