Show / Hide Table of Contents

Class 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.

Inheritance
System.Object
MoonSharpModuleAttribute
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public sealed class MoonSharpModuleAttribute : Attribute

Properties

Namespace

Gets or sets the namespace, that is the name of the table which will contain the defined functions. Can be null to be in the global table.

Declaration
public string Namespace { get; set; }
Property Value
System.String

Back to top Built by Itinero, MIT licensed.