I played with a C # application that contains IronPython, IronRuby, and (hopefully) PowerShell. Since IronPython and IronRuby were completely DLR-based, the APIs for using them are pretty much identical.
IronPython.Hosting.Python.CreateEngine()
and
IronRuby.Ruby.CreateEngine()
both create instances of Microsoft.Scripting.Hosting.ScriptEngine . Is there any hope of forcing PowerShell 3.0 to create ScriptEngine? I couldnโt find much on this subject, except PowerShell 3.0 seems to be built on DLR more than the previous version (see http://huddledmasses.org/powershell-3-finally-on-the-dlr .
It doesn't look like you can include a PowerShell engine created with the following in ScriptEngine.
System.Management.Automation.PowerShell.Create()
I suspect that if I really want to handle PowerShell through the same API, I need to create my own ScriptEngine that wraps the PowerShell node.
Brad campbell
source share