Пример #1
0
        /// <summary>
        /// apply When execute function.
        /// </summary>
        /// <param name="args">The arguments.</param>
        /// <param name="result">The result of the arguments.</param>
        /// <returns></returns>
        public string Execute(string[] args, out bool result)
        {
            result = true;
            try
            {
                if (args == null || args.Length == 0)
                {
                    throw new Exception("invalid args");
                }
                IDirectoryHandler handler = handlers[args[1]];
                string            message = model.CloseHandler(handler, out result);
            } catch (Exception e) { result = false; }

            return("ok");
        }