C# 클래스 LuaSharp.Lua

Represents a Lua state.
A Lua state is akin to an AppDomain in .Net.
상속: IDisposable
파일 보기 프로젝트 열기: jsimmons/LuaSharp 1 사용 예제들

공개 메소드들

메소드 설명
CreateTable ( ) : LuaSharp.LuaTable

Creates a new table in the state.

CreateTable ( int initialArrayCapacity, int initialNonArrayCapacity ) : LuaSharp.LuaTable

Creates the table.

Dispose ( ) : void

Releases all resource used by the LuaSharp.Lua object.

Call Dispose when you are finished using the LuaSharp.Lua. The Dispose method leaves the LuaSharp.Lua in an unusable state. After calling Dispose, you must release all references to the LuaSharp.Lua so the garbage collector can reclaim the memory that the LuaSharp.Lua was occupying.

DoFile ( string filename ) : void

Executes the code contained in a file.

DoString ( string chunk ) : void

Executes a literal chunk of Lua code.

GetValue ( ) : object

Returns the value at the given path.

Lua ( ) : System

Creates a new instance of the Lua class.

SetLibraryPath ( string path ) : void

Sets the path where the Lua state looks for `requires` files.

Paths should be separated by a semicolon, and contain a single question mark `?` where the name of the required library should be substituted.

SetValue ( object o ) : void

Sets the object at path defined by fragments to the object o.

this ( ) : object

Gets or sets the a Lua object with the specified path.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases all resource used by the LuaSharp.Lua object.

Call Dispose when you are finished using the LuaSharp.Lua. The Dispose method leaves the LuaSharp.Lua in an unusable state. After calling Dispose, you must release all references to the LuaSharp.Lua so the garbage collector can reclaim the memory that the LuaSharp.Lua was occupying.

메소드 상세

CreateTable() 공개 메소드

Creates a new table in the state.
public CreateTable ( ) : LuaSharp.LuaTable
리턴 LuaSharp.LuaTable

CreateTable() 공개 메소드

Creates the table.
/// Is thrown when an argument passed to a method is invalid because it is . ///
public CreateTable ( int initialArrayCapacity, int initialNonArrayCapacity ) : LuaSharp.LuaTable
initialArrayCapacity int /// The initial capacity for array elements. ///
initialNonArrayCapacity int /// THe initial capacity for non-array elements. ///
리턴 LuaSharp.LuaTable

Dispose() 공개 메소드

Releases all resource used by the LuaSharp.Lua object.
Call Dispose when you are finished using the LuaSharp.Lua. The Dispose method leaves the LuaSharp.Lua in an unusable state. After calling Dispose, you must release all references to the LuaSharp.Lua so the garbage collector can reclaim the memory that the LuaSharp.Lua was occupying.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases all resource used by the LuaSharp.Lua object.
Call Dispose when you are finished using the LuaSharp.Lua. The Dispose method leaves the LuaSharp.Lua in an unusable state. After calling Dispose, you must release all references to the LuaSharp.Lua so the garbage collector can reclaim the memory that the LuaSharp.Lua was occupying.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

DoFile() 공개 메소드

Executes the code contained in a file.
public DoFile ( string filename ) : void
filename string /// A containing the path to the file. ///
리턴 void

DoString() 공개 메소드

Executes a literal chunk of Lua code.
public DoString ( string chunk ) : void
chunk string /// A that containes the chunk to execute. ///
리턴 void

GetValue() 공개 메소드

Returns the value at the given path.
public GetValue ( ) : object
리턴 object

Lua() 공개 메소드

Creates a new instance of the Lua class.
public Lua ( ) : System
리턴 System

SetLibraryPath() 공개 메소드

Sets the path where the Lua state looks for `requires` files.
Paths should be separated by a semicolon, and contain a single question mark `?` where the name of the required library should be substituted.
public SetLibraryPath ( string path ) : void
path string /// The library path. ///
리턴 void

SetValue() 공개 메소드

Sets the object at path defined by fragments to the object o.
public SetValue ( object o ) : void
o object /// A the object to set. ///
리턴 void

this() 공개 메소드

Gets or sets the a Lua object with the specified path.
public this ( ) : object
리턴 object