static int _m_GetSlice(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.IO.IByteBuffer gen_to_be_invoked = (MongoDB.Bson.IO.IByteBuffer)translator.FastGetCSObj(L, 1); { int _position = LuaAPI.xlua_tointeger(L, 2); int _length = LuaAPI.xlua_tointeger(L, 3); MongoDB.Bson.IO.IByteBuffer gen_ret = gen_to_be_invoked.GetSlice(_position, _length); translator.PushAny(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 3 && translator.Assignable <MongoDB.Bson.IO.IByteBuffer>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) { MongoDB.Bson.IO.IByteBuffer _buffer = (MongoDB.Bson.IO.IByteBuffer)translator.GetObject(L, 2, typeof(MongoDB.Bson.IO.IByteBuffer)); bool _ownsBuffer = LuaAPI.lua_toboolean(L, 3); MongoDB.Bson.IO.ByteBufferStream gen_ret = new MongoDB.Bson.IO.ByteBufferStream(_buffer, _ownsBuffer); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <MongoDB.Bson.IO.IByteBuffer>(L, 2)) { MongoDB.Bson.IO.IByteBuffer _buffer = (MongoDB.Bson.IO.IByteBuffer)translator.GetObject(L, 2, typeof(MongoDB.Bson.IO.IByteBuffer)); MongoDB.Bson.IO.ByteBufferStream gen_ret = new MongoDB.Bson.IO.ByteBufferStream(_buffer); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to MongoDB.Bson.IO.ByteBufferStream constructor!")); }
static int _m_SetBytes(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.IO.IByteBuffer gen_to_be_invoked = (MongoDB.Bson.IO.IByteBuffer)translator.FastGetCSObj(L, 1); { int _position = LuaAPI.xlua_tointeger(L, 2); byte[] _source = LuaAPI.lua_tobytes(L, 3); int _offset = LuaAPI.xlua_tointeger(L, 4); int _count = LuaAPI.xlua_tointeger(L, 5); gen_to_be_invoked.SetBytes(_position, _source, _offset, _count); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <MongoDB.Bson.IO.IByteBuffer>(L, 2)) { MongoDB.Bson.IO.IByteBuffer _slice = (MongoDB.Bson.IO.IByteBuffer)translator.GetObject(L, 2, typeof(MongoDB.Bson.IO.IByteBuffer)); MongoDB.Bson.RawBsonDocument gen_ret = new MongoDB.Bson.RawBsonDocument(_slice); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { byte[] _bytes = LuaAPI.lua_tobytes(L, 2); MongoDB.Bson.RawBsonDocument gen_ret = new MongoDB.Bson.RawBsonDocument(_bytes); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to MongoDB.Bson.RawBsonDocument constructor!")); }
static int _g_get_IsReadOnly(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.IO.IByteBuffer gen_to_be_invoked = (MongoDB.Bson.IO.IByteBuffer)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsReadOnly); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(1); }
static int _s_set_Length(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.IO.IByteBuffer gen_to_be_invoked = (MongoDB.Bson.IO.IByteBuffer)translator.FastGetCSObj(L, 1); gen_to_be_invoked.Length = LuaAPI.xlua_tointeger(L, 2); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <MongoDB.Bson.IO.IByteBuffer>(L, 2)) { MongoDB.Bson.IO.IByteBuffer _slice = (MongoDB.Bson.IO.IByteBuffer)translator.GetObject(L, 2, typeof(MongoDB.Bson.IO.IByteBuffer)); MongoDB.Bson.RawBsonArray gen_ret = new MongoDB.Bson.RawBsonArray(_slice); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to MongoDB.Bson.RawBsonArray constructor!")); }
static int _m_MakeReadOnly(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.IO.IByteBuffer gen_to_be_invoked = (MongoDB.Bson.IO.IByteBuffer)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.MakeReadOnly( ); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 4 && translator.Assignable <MongoDB.Bson.IO.IByteBuffer>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) { MongoDB.Bson.IO.IByteBuffer _buffer = (MongoDB.Bson.IO.IByteBuffer)translator.GetObject(L, 2, typeof(MongoDB.Bson.IO.IByteBuffer)); int _offset = LuaAPI.xlua_tointeger(L, 3); int _length = LuaAPI.xlua_tointeger(L, 4); MongoDB.Bson.IO.ByteBufferSlice gen_ret = new MongoDB.Bson.IO.ByteBufferSlice(_buffer, _offset, _length); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to MongoDB.Bson.IO.ByteBufferSlice constructor!")); }
static int _m_ReadRawBsonDocument(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.IO.IBsonReader gen_to_be_invoked = (MongoDB.Bson.IO.IBsonReader)translator.FastGetCSObj(L, 1); { MongoDB.Bson.IO.IByteBuffer gen_ret = gen_to_be_invoked.ReadRawBsonDocument( ); translator.PushAny(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_ReadRawBsonDocument_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { MongoDB.Bson.IO.IBsonReader _reader = (MongoDB.Bson.IO.IBsonReader)translator.GetObject(L, 1, typeof(MongoDB.Bson.IO.IBsonReader)); string _name = LuaAPI.lua_tostring(L, 2); MongoDB.Bson.IO.IByteBuffer gen_ret = MongoDB.Bson.IO.IBsonReaderExtensions.ReadRawBsonDocument(_reader, _name); translator.PushAny(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_WriteRawBsonDocument_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { MongoDB.Bson.IO.IBsonWriter _writer = (MongoDB.Bson.IO.IBsonWriter)translator.GetObject(L, 1, typeof(MongoDB.Bson.IO.IBsonWriter)); string _name = LuaAPI.lua_tostring(L, 2); MongoDB.Bson.IO.IByteBuffer _slice = (MongoDB.Bson.IO.IByteBuffer)translator.GetObject(L, 3, typeof(MongoDB.Bson.IO.IByteBuffer)); MongoDB.Bson.IO.IBsonWriterExtensions.WriteRawBsonDocument(_writer, _name, _slice); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_Create_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { MongoDB.Bson.IO.IBsonChunkSource _chunkSource = (MongoDB.Bson.IO.IBsonChunkSource)translator.GetObject(L, 1, typeof(MongoDB.Bson.IO.IBsonChunkSource)); int _minimumCapacity = LuaAPI.xlua_tointeger(L, 2); MongoDB.Bson.IO.IByteBuffer gen_ret = MongoDB.Bson.IO.ByteBufferFactory.Create(_chunkSource, _minimumCapacity); translator.PushAny(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_EnsureCapacity(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.IO.IByteBuffer gen_to_be_invoked = (MongoDB.Bson.IO.IByteBuffer)translator.FastGetCSObj(L, 1); { int _minimumCapacity = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.EnsureCapacity(_minimumCapacity); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_WriteRawBsonDocument(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.IO.WrappingBsonWriter gen_to_be_invoked = (MongoDB.Bson.IO.WrappingBsonWriter)translator.FastGetCSObj(L, 1); { MongoDB.Bson.IO.IByteBuffer _slice = (MongoDB.Bson.IO.IByteBuffer)translator.GetObject(L, 2, typeof(MongoDB.Bson.IO.IByteBuffer)); gen_to_be_invoked.WriteRawBsonDocument(_slice); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_AccessBackingBytes(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.IO.IByteBuffer gen_to_be_invoked = (MongoDB.Bson.IO.IByteBuffer)translator.FastGetCSObj(L, 1); { int _position = LuaAPI.xlua_tointeger(L, 2); System.ArraySegment <byte> gen_ret = gen_to_be_invoked.AccessBackingBytes(_position); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_SetByte(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.IO.IByteBuffer gen_to_be_invoked = (MongoDB.Bson.IO.IByteBuffer)translator.FastGetCSObj(L, 1); { int _position = LuaAPI.xlua_tointeger(L, 2); byte _value = (byte)LuaAPI.xlua_tointeger(L, 3); gen_to_be_invoked.SetByte(_position, _value); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }