void StopServices(IService service)
        {
            var input = service.GetInput <Item[]>();

            ServiceStateProcessor.StopServices(input.Select(n => n.ServiceName).ToArray());
            service.SendResult(new object());
        }
Beispiel #2
0
        public static bool Process(string[] args)
        {
            try
            {
                switch (args[0])
                {
                case "-create":
                    var path = Json.ParseBase64 <string>(args[1]);
                    FolderCreator.Create(path, true);
                    return(true);

                case "-startServices":
                    var services = Json.ParseBase64 <string[]>(args[1]);
                    ServiceStateProcessor.StartServices(services);
                    return(true);

                case "-stopServices":
                    services = Json.ParseBase64 <string[]>(args[1]);
                    ServiceStateProcessor.StopServices(services);
                    return(true);

                default:
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }