Question

I need to run some validation tests on our c# client-server configuration. Is there a dynamic script language that my client application could run, that would have full access to all of its C# classes and asssemblies?

Something like beanshell for java: http://www.beanshell.org/intro.html

Thanks!

Was it helpful?

Solution

How about IronPython?

OTHER TIPS

I think your best option would be Windows Powershell.

I recommend trying out Mono's Evaluator class, which has methods for evaluating single statements or code blocks (which are returned as delegates).

If your application is an ASP.NET application, you can effectively script it in C# using the App_Code folder. In the application's folder, create a folder called App_Code and drop a .cs file in there. Any changes to this file will be dynamically compiled by the ASP.NET compiler and result in a restart of the application. This code will have access to all of the assemblies in your app.

To get this code to execute, you can hook up to an application event or you can write a piece of code in your application to dynamically discover and call it, for example by implementing a known interface with an App_Code class and doing an assembly scan for it when your app starts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top