Microsoft's documented way to add script extensibility to anything is IActiveScript. You can use IActiveScript from within anyt .NET app, to call script logic. The logic can party on .NET objects that you've placed into the scripting context.
This answer provides an application that does it, with code:
- Will the IE10 Chakra JScript engine available as stand alone accessible from C#?