C#:外壳/控制台框架

C#:外壳/控制台框架,c#,C#,我正在寻找一个.NET framework来创建一个控制台应用程序,该应用程序模拟一个shell(比如cmd),即带有一个接收命令输入的提示符(由我定义) 有人知道这样做的编程示例或框架吗?嗯,已经存在了。这是最好的一个,但它是用C编写的++ 您应该看看解释器设计模式。您可以看看IronPython。它有一个交互式shell,您可以阅读它的源代码。我为此编写了一个小框架。您可以找到它。我认为自适应控制台框架非常适合您的需求 它是一个控制台应用程序框架,使您能够轻松构建控制台应用程序,并为使用M

我正在寻找一个.NET framework来创建一个控制台应用程序,该应用程序模拟一个shell(比如cmd),即带有一个接收命令输入的提示符(由我定义)


有人知道这样做的编程示例或框架吗?

嗯,已经存在了。

这是最好的一个,但它是用C编写的++


您应该看看解释器设计模式。

您可以看看IronPython。它有一个交互式shell,您可以阅读它的源代码。

我为此编写了一个小框架。您可以找到它。

我认为自适应控制台框架非常适合您的需求

它是一个控制台应用程序框架,使您能够轻松构建控制台应用程序,并为使用Microsoft.NET技术构建的控制台应用程序带来灵活性和可测试性

使用ACF,您可以获得以下好处:

* Automatic command line argument parsing and validation
* Multiple command line syntax supported
* Generate the command line syntax and argument description automatically
* An command line argument can have many different aliases
* Orderless command line argument parsing (Users do not need to input their arguments in the specific order when using your console application)
* Test Driven Design is supported. ACF makes your console application testable
* ACF brings the flexibility to your console application. You can add or remove the command line syntax just by simple configuration 

我正在考虑用自己的命令(在C#中)构建自己的shell,我可以在PowerShell中这样做吗?当然可以:您可以用C#或脚本语言本身编写命令(称为cmdlet)。