private static string GetOptionDescription(OptionRule opt)
        {
            var sb = new StringBuilder(opt.Description);

            if (opt.Required)
            {
                sb.Append(" Required.");
            }
            if (opt.DependOnCommands.Length > 0)
            {
                sb.AppendFormat(" Valid with commands: {0}.", opt.DependOnCommands.Join(", "));
            }
            return(sb.ToString());
        }
        private static string GetOptionString(OptionRule opt, bool full, string optPrefix)
        {
            switch (opt.Type)
            {
            case OptionType.Valueless:
                return(optPrefix + opt.Name);

            case OptionType.Bool:
                return(optPrefix + opt.Name + (full ? "[+|-]" : "+"));

            case OptionType.Value:
                return(optPrefix + opt.Name + (full ? "=<value>" : "="));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }