Show / Hide Table of Contents

Class ScriptOptions

This class contains options to customize behaviour of Script objects.

Inheritance
System.Object
ScriptOptions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class ScriptOptions

Properties

CheckThreadAccess

Gets or sets a value indicating whether the thread check is enabled. A "lazy" thread check is performed everytime execution is entered to ensure that no two threads calls MoonSharp execution concurrently. However 1) the check is performed best effort (thus, it might not detect all issues) and 2) it might trigger in very odd legal situations (like, switching threads inside a CLR-callback without actually having concurrency.

Disable this option if the thread check is giving problems in your scenario, but please check that you are not calling MoonSharp execution concurrently as it is not supported.

Declaration
public bool CheckThreadAccess { get; set; }
Property Value
System.Boolean

ColonOperatorClrCallbackBehaviour

Gets or sets a value which dictates the behaviour of the colon (':') operator in callbacks to CLR code.

Declaration
public ColonOperatorBehaviour ColonOperatorClrCallbackBehaviour { get; set; }
Property Value
ColonOperatorBehaviour

DebugInput

Gets or sets the debug input handler (takes a prompt as an input, for interactive interpreters, like debug.debug).

Declaration
public Func<string, string> DebugInput { get; set; }
Property Value
Func<System.String, System.String>

DebugPrint

Gets or sets the debug print handler

Declaration
public Action<string> DebugPrint { get; set; }
Property Value
Action<System.String>

Stderr

Gets or sets the stream used as stderr. If null, a default stream is used.

Declaration
public Stream Stderr { get; set; }
Property Value
Stream

Stdin

Gets or sets the stream used as stdin. If null, a default stream is used.

Declaration
public Stream Stdin { get; set; }
Property Value
Stream

Stdout

Gets or sets the stream used as stdout. If null, a default stream is used.

Declaration
public Stream Stdout { get; set; }
Property Value
Stream

TailCallOptimizationThreshold

Gets or sets the stack depth threshold at which MoonSharp starts doing tail call optimizations. TCOs can provide the little benefit of avoiding stack overflows in corner case scenarios, at the expense of losing debug information and error stack traces in all other, more common scenarios. MoonSharp choice is to start performing TCOs only after a certain threshold of stack usage is reached - by default half the current stack depth (128K entries), thus 64K entries, on either the internal stacks. Set this to int.MaxValue to disable TCOs entirely, or to 0 to always have TCOs enabled.

Declaration
public int TailCallOptimizationThreshold { get; set; }
Property Value
System.Int32

UseLuaErrorLocations

Gets or sets a value indicating whether error messages will use Lua error locations instead of MoonSharp improved ones. Use this for compatibility with legacy Lua code which parses error messages.

Declaration
public bool UseLuaErrorLocations { get; set; }
Property Value
System.Boolean

Back to top Built by Itinero, MIT licensed.