Example #1
0
        private static bool HandlerArgs(string[] args)
        {
            bool endApp = false;

            if (args.Length > 0)
            {
                Log.Notice("Program CLI", "App started as CLI with " + args.Length + " args");
                for (int i = 0; i < args.Length; i++)
                {
                    switch (args[i])
                    {
                    case "--set-status":
                        i++;
                        if (i > args.Length)
                        {
                            throw new Exception("New status not found");
                        }
                        string status = args[i];
                        endApp = true;
                        ExternalProvider.WriteStatusFile(status);
                        break;
                    }
                }
            }
            return(endApp);
        }