Show / Hide Table of Contents

Enum InteropAccessMode

Enumerations of the possible strategies to marshal CLR objects to MoonSharp userdata and functions when using automatic descriptors. Note that these are "hints" and MoonSharp is free to ignore the access mode specified (if different from HideMembers) and downgrade the access mode to "Reflection". This particularly happens when running on AOT platforms like iOS. See also : CallbackFunction and UserData .

Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public enum InteropAccessMode

BackgroundOptimized

Optimization is done in a background thread which starts at registration time. If a member is accessed before optimization is completed, reflection is used.

Default

Use the default access mode

Hardwired

Use the hardwired descriptor(s)

HideMembers

No optimization is done, and members are not accessible at all.

LazyOptimized

Optimization is done on the fly the first time a member is accessed. This saves memory for all members that are never accessed, at the cost of an increased script execution time.

NoReflectionAllowed

No reflection is allowed, nor code generation. This is used as a safeguard when registering types which should not use a standard reflection based descriptor - for example for types implementing IUserDataType

Preoptimized

Optimization is done at registration time.

Reflection

Optimization is not performed and reflection is used everytime to access members. This is the slowest approach but saves a lot of memory if members are seldomly used.

Back to top Built by Itinero, MIT licensed.