Esempio n. 1
0
        public static string create(string name, string[] cmd, string[] arg)
        {
            string newCmd = name;

            for (int i = 0; i < cmd.Length; ++i)
            {
                //   newCmd += (partsSep + cmd[i] + cmdMark + arg[i]);
                newCmd += (partsSep + ArguemntItem.format(new ArguemntItem(cmd[i], arg[i])));
            }

            return(newCmd);
        }
Esempio n. 2
0
        public static string setArgValue(string pCmdLine, string pCmdArgName, string pCmdArgValue)
        {
            string[] args = ToolString.explodeList(partsSep, pCmdLine);
            for (int i = 0; i < args.Length; ++i)
            {
                ArguemntItem item_ = ArguemntItem.parse(args[i]);
                if (item_.name.ToLowerInvariant() == pCmdArgName.ToLowerInvariant())
                {
                    args[i] = ArguemntItem.format(new ArguemntItem(pCmdArgName, pCmdArgValue));
                    return(ToolString.joinList(partsSep, args));
                }
            }

            return(addArgValue(pCmdLine, pCmdArgName, pCmdArgValue));
        }
Esempio n. 3
0
 public static string addArgValue(string pCmdLine, string pCmdArgName, string pCmdArgValue)
 {
     return(pCmdLine + partsSep + ArguemntItem.format(new ArguemntItem(pCmdArgName, pCmdArgValue)));
 }