microsoft / ClearScript

A library for adding scripting to .NET applications. Supports V8 (Windows, Linux, macOS) and JScript/VBScript (Windows).
https://microsoft.github.io/ClearScript/
MIT License
1.77k stars 148 forks source link

AddHostType, internal type #427

Closed CrosRoad95 closed 2 years ago

CrosRoad95 commented 2 years ago

Do host type need to be public? when i'm trying to add internal classes, no properties and methods get added

ClearScriptLib commented 2 years ago

when i'm trying to add internal classes, no properties and methods get added

ClearScript provides a number of ways to expose non-public resources. Try something like this:

engine.AddHostType("Something", HostItemFlags.PrivateAccess, typeof(Something));

Good luck!

ClearScriptLib commented 2 years ago

Please reopen this issue if you have additional questions about this topic. Thank you!