public LuaInstance()
        {
            lua      = new Lua();
            packages = new HashSet <string>();

            try
            {
                global = lua.CreateEnvironment();
                global["package.path"] = LuaConfig.PackagePath;

                LuaAerospike.LoadLibrary(this);
                LuaStream.LoadLibrary(this);

                Assembly assembly = Assembly.GetExecutingAssembly();
                LoadSystemPackage(assembly, "aslib");
                LoadSystemPackage(assembly, "stream_ops");
                LoadSystemPackage(assembly, "aerospike");
            }
            catch (Exception)
            {
                lua.Dispose();
                throw;
            }
        }
 public static bool writeable(LuaStream stream)
 {
     return stream.Writeable();
 }
 public static void write(LuaStream stream, object obj)
 {
     stream.Write(obj);
 }
 public static bool readable(LuaStream stream)
 {
     return stream.Readable();
 }
 public static object read(LuaStream stream)
 {
     return stream.Read();
 }
示例#6
0
 public static bool writeable(LuaStream stream)
 {
     return(stream.Writeable());
 }
示例#7
0
 public static bool readable(LuaStream stream)
 {
     return(stream.Readable());
 }
示例#8
0
 public static void write(LuaStream stream, object obj)
 {
     stream.Write(obj);
 }
示例#9
0
 public static object read(LuaStream stream)
 {
     return(stream.Read());
 }