Beispiel #1
0
        /// <summary>
        ///  解析命令行
        /// </summary>
        /// <param name="userInput">用户输入</param>
        /// <returns></returns>
        public static void AnalysisOneCode(string userInput)
        {
            string[]    parameters;
            string      cmd      = SeparationCode(out parameters, userInput);
            IPrepare    prepare  = new Admin();
            BaseCommand cmdClass = LoadCommandSet.GetProcessClass(cmd);

            prepare.Send(userInput);
            if (cmdClass == null)
            {
                Console.WriteLine($"未知命令“{cmd}”!");
                return;
            }
            cmdClass.ExecuteOperation(parameters);
        }