/// <summary> /// 执行cmb命令并返回cmb对象 /// </summary> /// <param name="str"></param> /// <returns></returns> public static Cmb RunNewCmb(this IEnumerable <string> en) { var cmb = new Cmb(); cmb.RunWaitReturn(en); return(cmb); }
/// <summary> /// 执行cmb命令并返回执行结果,输出Cmb对象 /// </summary> /// <param name="str"></param> /// <param name="cmb"></param> /// <param name="waitTime">等待多少秒超时(waitTime<=0时不超时)</param> /// <returns></returns> public static string RunNewCmb(this string str, out Cmb cmb, int waitTime = 10) { cmb = new Cmb(); return(cmb.RunWaitReturn(str, 10)); }