如何设计命令行工具? [英] How to design a command line tool?

查看:370
本文介绍了如何设计命令行工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为我的项目开发一个命令行工具,请给我一些有关设计的建议,例如如何使其保持高效,便捷...

I want to develop a command line tool for my project,Please give me some suggestions about the design,such as how to keep it efficient,convenient...

推荐答案

只是给您一些想法:您能否看一下我基于枚举类型的.NET命令行实用程序库的实现;请参阅我的CodeProject文章基于枚举的命令行实用程序 [
Just to give you some ideas: would you look at my .NET implementation of command line utility library based on enumeration types; see my CodeProject article Enumeration-based Command Line Utility[^]. The benefits of my approach is ease of use and good maintainability of the code, because the functionality is based on type declarations, so the code is validated by the compiler in contrast to approach based on string constants.

I hope, based on your knowledge of Java reading my C# code and article will not be too difficult.

—SA


这篇关于如何设计命令行工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆