
I'd like to offer my users the ability to use C# or VB.NET as if they were scripting languages. In simple terms I mean that the user would enter code that is effectively just the body of a method.
I would then wrap that in auto-generated class/method declaration to produce compilable source.
But I want the Actipro editor to do all the great intellisense/autocompletion stuff. Hence I need the editor to analyse the code as if it was wrapped in the class/method declaration, but not display the wrapper code.
So the user just writes/sees:
log.WriteLine("Hello world");
For compilation I would wrap that as follows:
public static class UserScript
{
public void UserMethod(TextWriter log)
{
log.WriteLine("Hello world");
}
}
The user should get intellisense etc. when they type log because it's declared as a parameter to the wrapper method.
Is this possible with Actipro?