Creating a scripting environment for a C# program
Say I have an application that is connected to a database, with its own
forms that present data and allow data to be changed & entered, how would
one extend the program to be extensible by a third party?
For example a third party would be able to write scripts that the user can
run that would prompt the user for input. Part of the script would then
take what the user inputed (integer/string/boolean) and do some basic
programmatic things to it, math on integer values, concatenation on string
values (and other string functions), and logical tests to trigger further
user prompts etc etc, the scripting environment would also support
reading/writing to the application's database.
Would this be done simply by having text files the program could run, with
each line corresponding to a certain command? Then the application would
read each line, figure out what command the line represents, and equate
that to C# code? Are there any already existing solutions to this problem?
No comments:
Post a Comment