sebastienros / jint

Javascript Interpreter for .NET
BSD 2-Clause "Simplified" License
4.08k stars 560 forks source link

Dependency injection in TypeReference #1354

Closed Andrei-NZ closed 1 year ago

Andrei-NZ commented 1 year ago

Would it be safe/good idea to add dotnet dependency injection into dotnet interop function (TypeReference)?

Much like Quartz allows for a custom JobFactory in here: https://github.com/quartznet/quartznet/blob/main/src/Quartz/SPI/IJobFactory.cs

What I am trying to achieve is to be able to use DI services of dot net in the referenced types.

lahma commented 1 year ago

Should now be possible, see test case for sample.