Example #1
0
        public static void Execute(string hours, string minutes, string seconds, bool force = false, bool restart = false)
        {
            decimal h, m, s;

            if (!decimal.TryParse(hours, out h))
            {
                throw new ArgumentException(Texts.ErrorParsingParameter("hours"), "hours");
            }

            if (!decimal.TryParse(minutes, out m))
            {
                throw new ArgumentException(Texts.ErrorParsingParameter("minutes"), "minutes");
            }

            if (!decimal.TryParse(seconds, out s))
            {
                throw new ArgumentException(Texts.ErrorParsingParameter("seconds"), "seconds");
            }

            Execute(h, m, s, force, restart);
        }