static int _m_GetDiscriminator(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.Serialization.Conventions.HierarchicalDiscriminatorConvention gen_to_be_invoked = (MongoDB.Bson.Serialization.Conventions.HierarchicalDiscriminatorConvention)translator.FastGetCSObj(L, 1); { System.Type _nominalType = (System.Type)translator.GetObject(L, 2, typeof(System.Type)); System.Type _actualType = (System.Type)translator.GetObject(L, 3, typeof(System.Type)); MongoDB.Bson.BsonValue gen_ret = gen_to_be_invoked.GetDiscriminator(_nominalType, _actualType); translator.Push(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) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _elementName = LuaAPI.lua_tostring(L, 2); MongoDB.Bson.Serialization.Conventions.HierarchicalDiscriminatorConvention gen_ret = new MongoDB.Bson.Serialization.Conventions.HierarchicalDiscriminatorConvention(_elementName); 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.Serialization.Conventions.HierarchicalDiscriminatorConvention constructor!")); }