Skip to content
Discussion options

You must be logged in to vote

Hi @nextfool,

How could code like " engine.Evaluate("new AccessContextTestBase()")" would fail?

For script code to use a host resource, that resource must be both exposed and accessible. As you've noted, TestInitialize exposes AccessContextTestBase. However, initially, that class isn't accessible, because it's internal to the ClearScript.Core assembly1.

I mean, the default engine.AccessContext is the default "global" context isn't?

By default, AccessContext is null, which means that a host resource is accessible only if it has public visibility.

Neither of these two types defined a member "AccessContextTestBase" , then how suddenly after engine.AccessContext = GetType(), those the sa…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@nextfool
Comment options

Answer selected by nextfool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants