C# Класс DynamicLua.LuaHelper

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ExtractNativeDll void
ExtractNativeDlls void
LuaHelper System

Открытые методы

Метод Описание
GetRandomString ( ) : string

Returns a random string with lenght LuaHelper.RandomNameLength. This can be safely used as a Lua Variable Name, but is not checked for collsions.

GetRandomString ( int lenght ) : string

Returns a random string with the specified lenght. Use the overload without paramters for the default length. This can be safely used as a Lua Variable Name, but is not checked for collsions.

see http://dotnet-snippets.de/dns/passwort-generieren-SID147.aspx

UnWrapObject ( object wrapped, NLua.Lua state, string name = null ) : object

Unwaps an object comming from LuaInterface for use in DynamicLua.

WrapObject ( object toWrap, NLua.Lua state, string name = null ) : object

Wraps an object to prepare it for passing to LuaInterface. If no name is specified, a random one with the default length is used.

Приватные методы

Метод Описание
ExtractNativeDll ( string dllName ) : void

Extract the native DLL to the NativeDllPath

ExtractNativeDlls ( ) : void

This method extract the included native Lua-DLLs. It's important to extract the correct 32/64-bit version. We extract to %tmp%, we might not have write access to the current assembliy's locations. We append the path to the extracted DLLs to %PATH%, to make allow the system to find the DLL.

LuaHelper ( ) : System

Описание методов

GetRandomString() публичный статический Метод

Returns a random string with lenght LuaHelper.RandomNameLength. This can be safely used as a Lua Variable Name, but is not checked for collsions.
public static GetRandomString ( ) : string
Результат string

GetRandomString() публичный статический Метод

Returns a random string with the specified lenght. Use the overload without paramters for the default length. This can be safely used as a Lua Variable Name, but is not checked for collsions.
see http://dotnet-snippets.de/dns/passwort-generieren-SID147.aspx
public static GetRandomString ( int lenght ) : string
lenght int
Результат string

UnWrapObject() публичный статический Метод

Unwaps an object comming from LuaInterface for use in DynamicLua.
public static UnWrapObject ( object wrapped, NLua.Lua state, string name = null ) : object
wrapped object
state NLua.Lua
name string
Результат object

WrapObject() публичный статический Метод

Wraps an object to prepare it for passing to LuaInterface. If no name is specified, a random one with the default length is used.
public static WrapObject ( object toWrap, NLua.Lua state, string name = null ) : object
toWrap object
state NLua.Lua
name string
Результат object