SteveSandersonMS / DotNetIsolator

A library for running isolated .NET runtimes inside .NET
MIT License
604 stars 40 forks source link

A way for the host to provide methods the isolated code can invoke? #8

Closed gilliganc closed 1 year ago

gilliganc commented 1 year ago

Is there a way for the host to provide an instance or methods that the isolated environment could invoke on the host? I love that the isolated environment has no file or network access but i would like for the host to provide a method the isolated code could call to say read a file or get a url. This would allow the host app to verify if the isolated code should get access to that resource and then choose to provide that data indirectly to that isolated environment.

SteveSandersonMS commented 1 year ago

It's a great suggestion and one that others have also raised. And I now need it myself. So it's being implemented in https://github.com/SteveSandersonMS/DotNetIsolator/pull/11

Usage example will be in the updated README.

gilliganc commented 1 year ago

Thanks looks great I will have a play. I do have one more suggestion but I will create a separate ticket for it