开发者

Simple ,fast script support for a c# application

I have developed an application which can create Xml files from Xml schema with some user defined rules for generating value for each node.

I want to give my user the ability to write scripts for generating value for each node an开发者_如何学运维d in this scripts user should be able to refer to generated value of other nodes . a simple script will be something like :

returtn (@node1.value + 10) ;

I don't know what will be the value of @node1.value because the file generation process hasn't started yet.

so what is the solution do I have to replace it every time with the generated value and then run the script or is there a better way to do something like this ?

may be I have to run this script thousand of times to generate value for created instances so which scripting language is the fastest one for me to use ?

thanks


You can look at IronPython.
If you are looking for a script language with a sysntax similar to C#, then you can look at CS-Script.


Have you looked at using C# as your scripting language?

http://www.csscript.net/


Use locks :-). If someone invokes get_method of the property that isn't set just lock the caller until value is set.


PowerShell embeds well into a C# application, here's how from the PowerShell Team Blog

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜