Show / Hide Table of Contents

Namespace Itinero.Profiles.Lua

Classes

CallbackArguments

This class is a container for arguments received by a CallbackFunction

CallbackFunction

This class wraps a CLR function

Closure

A class representing a script function

Coroutine

A class representing a script coroutine

DynamicExpression

Represents a dynamic expression in the script

DynamicExpressionException

Exception thrown when a dynamic expression is invalid

DynValue

A class representing a value in a Lua/MoonSharp script.

InternalErrorException

Exception thrown when an inconsistent state is reached in the interpreter

InterpreterException

Base type of all exceptions thrown in MoonSharp

LinqHelpers

LINQ helper methods

LuaExtensions

Containts extension methods related to Lua and Moonscharp.

LuaTypeExtensions

Extension methods to DataType

ModuleRegister

Class managing modules (mostly as extension methods)

MoonSharpHiddenAttribute

Forces a class member visibility to scripts. Can be used to hide public members. Equivalent to MoonSharpVisible(false).

MoonSharpHideMemberAttribute

Lists a userdata member not to be exposed to scripts referencing it by name.

MoonSharpModuleAttribute

Marks a CLR type to be a MoonSharp module. Modules are the fastest way to bring interop between scripts and CLR code, albeit at the cost of a very increased complexity in writing them. Modules is what's used for the standard library, for maximum efficiency.

Modules are basically classes containing only static methods, with the callback function signature.

See Table and ModuleRegister for (extension) methods used to register modules to a table.

See CallbackFunction for information regarding the standard callback signature along with easier ways to marshal methods.

See UserData for easier object marshalling.

MoonSharpModuleConstantAttribute

In a module type, mark fields with this attribute to have them exposed as a module constant.

See MoonSharpModuleAttribute for more information about modules.

MoonSharpModuleMethodAttribute

In a module type, mark methods or fields with this attribute to have them exposed as module functions. Methods must have the signature "public static DynValue ...(ScriptExecutionContextCallbackArguments)". Fields must be static or const strings, with an anonymous Lua function inside.

See MoonSharpModuleAttribute for more information about modules.

MoonSharpPropertyAttribute

Marks a property as a configruation property

MoonSharpUserDataAttribute

Marks a type of automatic registration as userdata (which happens only if UserData.RegisterAssembly is called).

MoonSharpUserDataMetamethodAttribute

Marks a method as the handler of metamethods of a userdata type

RefIdObject

A base class for many MoonSharp objects. Helds a ReferenceID property which gets a different value for every object instance, for debugging purposes. Note that the ID is not assigned in a thread safe manner for speed reason, so the IDs are guaranteed to be unique only if everything is running on one thread at a time.

Script

This class implements a MoonSharp scripting session. Multiple Script objects can coexist in the same program but cannot share data among themselves unless some mechanism is put in place.

ScriptExecutionContext

Class giving access to details of the environment where the script is executing

ScriptGlobalOptions

Class containing script global options, that is options which cannot be customized per-script. GlobalOptions

ScriptOptions

This class contains options to customize behaviour of Script objects.

ScriptRuntimeException

Exception for all runtime errors. In addition to constructors, it offers a lot of static methods generating more "standard" Lua errors.

SymbolRef

This class stores a possible l-value (that is a potential target of an assignment)

SyntaxErrorException

Exception for all parsing/lexing errors.

Table

A class representing a Lua table.

TailCallData

Class used to support "tail" continuations - a way for C# / Lua interaction which supports coroutine yielding (at the expense of a LOT of added complexity in calling code).

UserData

Class exposing C# objects as Lua userdata. For efficiency, a global registry of types is maintained, instead of a per-script one.

WellKnownSymbols

Constants of well known "symbols" in the MoonSharp grammar

YieldRequest

Class wrapping a request to yield a coroutine

Structs

TablePair

A class representing a key/value pair for Table use

Interfaces

IScriptPrivateResource

Common interface for all resources which are uniquely bound to a script.

Enums

Closure.UpvaluesType

Type of closure based on upvalues

ColonOperatorBehaviour

Defines behaviour of the colon ':' operator in CLR callbacks. Default behaviour is for ':' being treated the same as a '.' if the functions is implemented on the CLR side (e.g. in C#).

CoreModules

Enumeration (combinable as flags) of all the standard library modules

Coroutine.CoroutineType

Possible types of coroutine

CoroutineState

State of coroutines

DataType

Enumeration of possible data types in MoonSharp

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 .

SymbolRefType

Enumeration of the types of SymbolRef

TypeValidationFlags

Flags to alter the way the DynValue.CheckType and other related functions operate on data types for validation.

Delegates

ScriptFunctionDelegate

A Delegate type which can wrap a script function

ScriptFunctionDelegate<T>

A Delegate type which can wrap a script function with a generic typed return value

Back to top Built by Itinero, MIT licensed.