Exemple #1
0
        static int _g_get_Converter(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                MongoDB.Bson.Serialization.IRepresentationConverterConfigurable gen_to_be_invoked = (MongoDB.Bson.Serialization.IRepresentationConverterConfigurable)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.Converter);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Exemple #2
0
        static int _m_WithConverter(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.Serialization.IRepresentationConverterConfigurable gen_to_be_invoked = (MongoDB.Bson.Serialization.IRepresentationConverterConfigurable)translator.FastGetCSObj(L, 1);



                {
                    MongoDB.Bson.Serialization.Options.RepresentationConverter _converter = (MongoDB.Bson.Serialization.Options.RepresentationConverter)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.Options.RepresentationConverter));

                    MongoDB.Bson.Serialization.IBsonSerializer gen_ret = gen_to_be_invoked.WithConverter(_converter);
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }