是否有任何省力的方法可以将脚本语言嵌入到具有 Intellisense 支持的 .NET 应用程序中?
我有一个包含命令的 .NET 应用程序,我希望用户能够通过编写自己的命令来扩展该应用程序,这些命令将在具有有限权限的 AppDomain 中运行。我有一个模型类,我将把它注入到环境中,以暴露我的应用程序的功能,例如调用文件打开“blah”以及调用应用程序中的其他命令我希望用户在定义他们的应用程序时具有智能感知命令。
我正在探索 IronRuby、IronPython、Boo、M 我想使用任何一种语言&库或语言/库/工具为我提供了最少的智能感知。库或工具需要能够捆绑和分发(例如,没有 Visual Studio)
我希望该语言支持变量的概念,具有字符串解析和算术功能,因此它们可以有一个人为的命令,例如:
open file c:\listOfFiles.text
read file
store the text from line 2 in a variable XXX
loop over the characters in XXX and print their ASCII values.
I have a .NET application with commands in it which I'd like users to be able to extend by writing their own commands which will run in an AppDomain with limited permissions. I have a model class which I will be injecting into the environment they get to expose my app's functionality like calling file open "blah" for example as well as calling other commands within the application I'd like the users to have intellisense when defining their commands.
I'm exploring IronRuby, IronPython, Boo, M I'd like to use whichever language / language & libraries, or language / libraries / tooling gives me intellisense for the least amount of effort. Libraries or tools need to be able to be bundled and distributed (so no Visual Studio, for example)
I want the language to support the concept of variables, have string parsing, and arithmetic, so they could have a contrived command like:
open file c:\listOfFiles.text
read file
store the text from line 2 in a variable XXX
loop over the characters in XXX and print their ASCII values.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
IntelliSense 支持是您使用的文本编辑器的一项功能。 .NET 框架中没有任何东西可以使其实现变得更容易或更困难。您需要关注您希望在目标计算机上使用哪种类型的编辑器以及它支持哪种语言。 Scintilla 是典型的开源选择。
IntelliSense support is a feature of the text editor you use. There isn't anything in the .NET framework that would make it easier or harder to implement it. You'll need to focus on what kind of editor you want to have available on the target machine and what kind of languages it supports. Scintilla is a typical open source choice.
Actipro 为 C# http://www.actiprosoftware 提供了此功能。 com/products/dotnet/windowsforms/syntaxeditor/addons/dotnet/default.aspx 具有免费版本。
Actipro provides this for C# http://www.actiprosoftware.com/products/dotnet/windowsforms/syntaxeditor/addons/dotnet/default.aspx with a free version.