public void Configure(MongoDB.Bson.Serialization.BsonClassMap <IntegrationType> classMap) { classMap.AutoMap(); classMap.MapIdMember(c => c.Id); classMap.IdMemberMap.SetSerializer(new StringSerializer(BsonType.ObjectId)); classMap.MapMember(c => c.Name).SetElementName("name"); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 3 && translator.Assignable <MongoDB.Bson.Serialization.BsonClassMap>(L, 2) && translator.Assignable <System.Reflection.MemberInfo>(L, 3)) { MongoDB.Bson.Serialization.BsonClassMap _classMap = (MongoDB.Bson.Serialization.BsonClassMap)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.BsonClassMap)); System.Reflection.MemberInfo _memberInfo = (System.Reflection.MemberInfo)translator.GetObject(L, 3, typeof(System.Reflection.MemberInfo)); MongoDB.Bson.Serialization.BsonMemberMap gen_ret = new MongoDB.Bson.Serialization.BsonMemberMap(_classMap, _memberInfo); 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.BsonMemberMap constructor!")); }
static int _m_Apply(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.Serialization.Conventions.IgnoreExtraElementsConvention gen_to_be_invoked = (MongoDB.Bson.Serialization.Conventions.IgnoreExtraElementsConvention)translator.FastGetCSObj(L, 1); { MongoDB.Bson.Serialization.BsonClassMap _classMap = (MongoDB.Bson.Serialization.BsonClassMap)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.BsonClassMap)); gen_to_be_invoked.Apply(_classMap); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }
static int _m_PostProcess(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.Serialization.Conventions.StringObjectIdIdGeneratorConvention gen_to_be_invoked = (MongoDB.Bson.Serialization.Conventions.StringObjectIdIdGeneratorConvention)translator.FastGetCSObj(L, 1); { MongoDB.Bson.Serialization.BsonClassMap _classMap = (MongoDB.Bson.Serialization.BsonClassMap)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.BsonClassMap)); gen_to_be_invoked.PostProcess(_classMap); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }