C# Класс WF.Compiler.LUA

This static libray contains all function for handling the Lua source code.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Check ( Stream stream, string luaFileName ) : void

Check the specified luaCode in stream to see, if there are any errors.

Check ( string luaCode, string luaFileName ) : void

Check the specified luaCode to see, if there are any errors.

Compile ( string luaCode, string fileName = "Cartridge" ) : byte[]
Extract ( Stream stream ) : Cartridge

Extract cartridge data from specified luaCode in given stream.

Extract ( string luaCode ) : Cartridge

Extract cartridge data from the given specified luaCode in given string.

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

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

Converts the original Lua code to a plain version.

Replace all -
\n with \n -
with \n - long strings with only a \n with short strings containing \n This works although for Urwigo and Earwigo encoded strings. They are decoded, changed and encoded again.

ExtractDirectives ( LuaTable directives ) : List

Extracts the directives for a given media resource.

ExtractMedia ( LuaTable obj ) : Media

Extracts the media from the Lua code.

ExtractMediaResources ( LuaTable resources ) : List

Extracts the media resources from Lua.

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

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

Check the specified luaCode in stream to see, if there are any errors.
public static Check ( Stream stream, string luaFileName ) : void
stream Stream
luaFileName string
Результат void

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

Check the specified luaCode to see, if there are any errors.
public static Check ( string luaCode, string luaFileName ) : void
luaCode string String with Lua code to check.
luaFileName string
Результат void

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

public static Compile ( string luaCode, string fileName = "Cartridge" ) : byte[]
luaCode string
fileName string
Результат byte[]

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

Extract cartridge data from specified luaCode in given stream.
public static Extract ( Stream stream ) : Cartridge
stream Stream
Результат Cartridge

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

Extract cartridge data from the given specified luaCode in given string.
public static Extract ( string luaCode ) : Cartridge
luaCode string String with Lua code.
Результат Cartridge