aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteActions/DefaultRemoteActionsProvider.cs
blob: 41c41979b44aefc2a79827c6d4285c0ac3f2c759 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core.DI;
using Tango.FSE.Common.Connection;
using Tango.FSE.Common.RemoteActions;
using Tango.PPC.Shared.RemoteActions;

namespace Tango.FSE.UI.RemoteActions
{
    public class DefaultRemoteActionsProvider : IRemoteActionsProvider
    {
        [TangoInject]
        private IMachineProvider MachineProvider { get; set; }

        public void RestartApplication()
        {
            var response = MachineProvider.MachineOperator.SendGenericRequest<RestartApplicationRequest, RestartApplicationResponse>(new RestartApplicationRequest()
            {
                
            }).Result;
        }

        public void SimulateApplicationException(bool causeCrash)
        {
            var response = MachineProvider.MachineOperator.SendGenericRequest<SimulateApplicationExceptionRequest, SimulateApplicationExceptionResponse>(new SimulateApplicationExceptionRequest()
            {
                CrashApplication = causeCrash,
            }).Result;
        }
    }
}