static void NoMatchesHandler(bool isEmpty, string[] operands, Dictionary <string, object> noMatches) { if (isEmpty) { Cli.WriteLine($"欢迎使用 {Cli.GetDescription()}"); } if (operands.Length > 0) { Cli.Error($"未找到该操作符:{string.Join(",", operands)}"); } if (noMatches.Count > 0) { Cli.Error($"未找到该参数:{string.Join(",", noMatches.Keys)}"); } }
/// <summary> /// 输出简介 /// </summary> static void OutpuDescription() { Console.WriteLine(@" ______ _ _ _ _ | ____| (_) | | | | | | | |__ _ _ _ __ _ ___ _ __ | | | |_ __ __ _ _ __ __ _ __| | ___ | __| | | | '__| |/ _ \| '_ \ | | | | '_ \ / _` | '__/ _` |/ _` |/ _ \ | | | |_| | | | | (_) | | | | | |__| | |_) | (_| | | | (_| | (_| | __/ |_| \__,_|_| |_|\___/|_| |_| \____/| .__/ \__, |_| \__,_|\__,_|\___| | | __/ | |_| |___/ "); Cli.WriteLine($"欢迎使用{Cli.GetDescription()}"); Cli.WriteLine("作者:百小僧"); Cli.WriteLine("版本:" + Cli.GetVersion()); Cli.EmptyLine(); }