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


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



                {
                    System.Type _type = (System.Type)translator.GetObject(L, 2, typeof(System.Type));
                    MongoDB.Bson.Serialization.IBsonSerializerRegistry _serializerRegistry = (MongoDB.Bson.Serialization.IBsonSerializerRegistry)translator.GetObject(L, 3, typeof(MongoDB.Bson.Serialization.IBsonSerializerRegistry));

                    MongoDB.Bson.Serialization.IBsonSerializer gen_ret = gen_to_be_invoked.GetSerializer(_type, _serializerRegistry);
                    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) == 2 && translator.Assignable <object>(L, 2))
                {
                    object _value = translator.GetObject(L, 2, typeof(object));

                    MongoDB.Bson.BsonDocumentWrapper gen_ret = new MongoDB.Bson.BsonDocumentWrapper(_value);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 3 && translator.Assignable <object>(L, 2) && translator.Assignable <MongoDB.Bson.Serialization.IBsonSerializer>(L, 3))
                {
                    object _value = translator.GetObject(L, 2, typeof(object));
                    MongoDB.Bson.Serialization.IBsonSerializer _serializer = (MongoDB.Bson.Serialization.IBsonSerializer)translator.GetObject(L, 3, typeof(MongoDB.Bson.Serialization.IBsonSerializer));

                    MongoDB.Bson.BsonDocumentWrapper gen_ret = new MongoDB.Bson.BsonDocumentWrapper(_value, _serializer);
                    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.BsonDocumentWrapper constructor!"));
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    MongoDB.Bson.Serialization.Serializers.QueueSerializer gen_ret = new MongoDB.Bson.Serialization.Serializers.QueueSerializer();
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <MongoDB.Bson.Serialization.IBsonSerializer>(L, 2))
                {
                    MongoDB.Bson.Serialization.IBsonSerializer _itemSerializer = (MongoDB.Bson.Serialization.IBsonSerializer)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.IBsonSerializer));

                    MongoDB.Bson.Serialization.Serializers.QueueSerializer gen_ret = new MongoDB.Bson.Serialization.Serializers.QueueSerializer(_itemSerializer);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <MongoDB.Bson.Serialization.IBsonSerializerRegistry>(L, 2))
                {
                    MongoDB.Bson.Serialization.IBsonSerializerRegistry _serializerRegistry = (MongoDB.Bson.Serialization.IBsonSerializerRegistry)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.IBsonSerializerRegistry));

                    MongoDB.Bson.Serialization.Serializers.QueueSerializer gen_ret = new MongoDB.Bson.Serialization.Serializers.QueueSerializer(_serializerRegistry);
                    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.Serializers.QueueSerializer constructor!"));
        }
Exemple #4
0
        static int _m_Serialize(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    MongoDB.Bson.Serialization.BsonSerializationContext _context = (MongoDB.Bson.Serialization.BsonSerializationContext)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.BsonSerializationContext));
                    MongoDB.Bson.Serialization.BsonSerializationArgs    _args; translator.Get(L, 3, out _args);
                    object _value = translator.GetObject(L, 4, typeof(object));

                    gen_to_be_invoked.Serialize(_context, _args, _value);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemple #5
0
        static int _g_get_ValueType(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                MongoDB.Bson.Serialization.IBsonSerializer gen_to_be_invoked = (MongoDB.Bson.Serialization.IBsonSerializer)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.ValueType);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <MongoDB.Bson.Serialization.IBsonSerializer>(L, 3))
                {
                    string _name = LuaAPI.lua_tostring(L, 2);
                    MongoDB.Bson.Serialization.IBsonSerializer _rawSerializer = (MongoDB.Bson.Serialization.IBsonSerializer)translator.GetObject(L, 3, typeof(MongoDB.Bson.Serialization.IBsonSerializer));

                    MongoDB.Bson.Serialization.Serializers.PartiallyRawBsonDocumentSerializer gen_ret = new MongoDB.Bson.Serialization.Serializers.PartiallyRawBsonDocumentSerializer(_name, _rawSerializer);
                    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.Serializers.PartiallyRawBsonDocumentSerializer constructor!"));
        }
        static int _m_RegisterSerializer_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    System.Type _type = (System.Type)translator.GetObject(L, 1, typeof(System.Type));
                    MongoDB.Bson.Serialization.IBsonSerializer _serializer = (MongoDB.Bson.Serialization.IBsonSerializer)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.IBsonSerializer));

                    MongoDB.Bson.Serialization.BsonSerializer.RegisterSerializer(_type, _serializer);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_LookupSerializer_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    System.Type _type = (System.Type)translator.GetObject(L, 1, typeof(System.Type));

                    MongoDB.Bson.Serialization.IBsonSerializer gen_ret = MongoDB.Bson.Serialization.BsonSerializer.LookupSerializer(_type);
                    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) == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <MongoDB.Bson.Serialization.IBsonSerializer>(L, 3) && translator.Assignable <System.Type>(L, 4))
                {
                    string _elementName = LuaAPI.lua_tostring(L, 2);
                    MongoDB.Bson.Serialization.IBsonSerializer _serializer = (MongoDB.Bson.Serialization.IBsonSerializer)translator.GetObject(L, 3, typeof(MongoDB.Bson.Serialization.IBsonSerializer));
                    System.Type _nominalType = (System.Type)translator.GetObject(L, 4, typeof(System.Type));

                    MongoDB.Bson.Serialization.BsonSerializationInfo gen_ret = new MongoDB.Bson.Serialization.BsonSerializationInfo(_elementName, _serializer, _nominalType);
                    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.BsonSerializationInfo constructor!"));
        }
        static int _m_GetSerializer(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <System.Type>(L, 2))
                {
                    System.Type _type = (System.Type)translator.GetObject(L, 2, typeof(System.Type));

                    MongoDB.Bson.Serialization.IBsonSerializer gen_ret = gen_to_be_invoked.GetSerializer(_type);
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <System.Type>(L, 2) && translator.Assignable <MongoDB.Bson.Serialization.IBsonSerializerRegistry>(L, 3))
                {
                    System.Type _type = (System.Type)translator.GetObject(L, 2, typeof(System.Type));
                    MongoDB.Bson.Serialization.IBsonSerializerRegistry _serializerRegistry = (MongoDB.Bson.Serialization.IBsonSerializerRegistry)translator.GetObject(L, 3, typeof(MongoDB.Bson.Serialization.IBsonSerializerRegistry));

                    MongoDB.Bson.Serialization.IBsonSerializer gen_ret = gen_to_be_invoked.GetSerializer(_type, _serializerRegistry);
                    translator.PushAny(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.BsonSerializationProviderBase.GetSerializer!"));
        }
Exemple #11
0
        static int _m_ToBsonValue_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    MongoDB.Bson.Serialization.IBsonSerializer _serializer = (MongoDB.Bson.Serialization.IBsonSerializer)translator.GetObject(L, 1, typeof(MongoDB.Bson.Serialization.IBsonSerializer));
                    object _value = translator.GetObject(L, 2, typeof(object));

                    MongoDB.Bson.BsonValue gen_ret = MongoDB.Bson.Serialization.IBsonSerializerExtensions.ToBsonValue(_serializer, _value);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemple #12
0
        static int _m_GetSerializer(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    MongoDB.Bson.Serialization.IBsonSerializer gen_ret = gen_to_be_invoked.GetSerializer(  );
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemple #13
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));
            }
        }
        static int _m_WithDictionaryRepresentation(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    MongoDB.Bson.Serialization.Options.DictionaryRepresentation _dictionaryRepresentation; translator.Get(L, 2, out _dictionaryRepresentation);

                    MongoDB.Bson.Serialization.IBsonSerializer gen_ret = gen_to_be_invoked.WithDictionaryRepresentation(_dictionaryRepresentation);
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_WithItemSerializer(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    MongoDB.Bson.Serialization.IBsonSerializer _itemSerializer = (MongoDB.Bson.Serialization.IBsonSerializer)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.IBsonSerializer));

                    MongoDB.Bson.Serialization.Serializers.QueueSerializer gen_ret = gen_to_be_invoked.WithItemSerializer(_itemSerializer);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemple #16
0
        static int _m_ToJson(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                object gen_to_be_invoked = translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 6 && translator.Assignable <System.Type>(L, 2) && translator.Assignable <MongoDB.Bson.IO.JsonWriterSettings>(L, 3) && translator.Assignable <MongoDB.Bson.Serialization.IBsonSerializer>(L, 4) && translator.Assignable <System.Action <MongoDB.Bson.Serialization.BsonSerializationContext.Builder> >(L, 5) && translator.Assignable <MongoDB.Bson.Serialization.BsonSerializationArgs>(L, 6))
                {
                    System.Type _nominalType = (System.Type)translator.GetObject(L, 2, typeof(System.Type));
                    MongoDB.Bson.IO.JsonWriterSettings         _writerSettings = (MongoDB.Bson.IO.JsonWriterSettings)translator.GetObject(L, 3, typeof(MongoDB.Bson.IO.JsonWriterSettings));
                    MongoDB.Bson.Serialization.IBsonSerializer _serializer     = (MongoDB.Bson.Serialization.IBsonSerializer)translator.GetObject(L, 4, typeof(MongoDB.Bson.Serialization.IBsonSerializer));
                    System.Action <MongoDB.Bson.Serialization.BsonSerializationContext.Builder> _configurator = translator.GetDelegate <System.Action <MongoDB.Bson.Serialization.BsonSerializationContext.Builder> >(L, 5);
                    MongoDB.Bson.Serialization.BsonSerializationArgs _args; translator.Get(L, 6, out _args);

                    string gen_ret = gen_to_be_invoked.ToJson(_nominalType, _writerSettings, _serializer, _configurator, _args);
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 5 && translator.Assignable <System.Type>(L, 2) && translator.Assignable <MongoDB.Bson.IO.JsonWriterSettings>(L, 3) && translator.Assignable <MongoDB.Bson.Serialization.IBsonSerializer>(L, 4) && translator.Assignable <System.Action <MongoDB.Bson.Serialization.BsonSerializationContext.Builder> >(L, 5))
                {
                    System.Type _nominalType = (System.Type)translator.GetObject(L, 2, typeof(System.Type));
                    MongoDB.Bson.IO.JsonWriterSettings         _writerSettings = (MongoDB.Bson.IO.JsonWriterSettings)translator.GetObject(L, 3, typeof(MongoDB.Bson.IO.JsonWriterSettings));
                    MongoDB.Bson.Serialization.IBsonSerializer _serializer     = (MongoDB.Bson.Serialization.IBsonSerializer)translator.GetObject(L, 4, typeof(MongoDB.Bson.Serialization.IBsonSerializer));
                    System.Action <MongoDB.Bson.Serialization.BsonSerializationContext.Builder> _configurator = translator.GetDelegate <System.Action <MongoDB.Bson.Serialization.BsonSerializationContext.Builder> >(L, 5);

                    string gen_ret = gen_to_be_invoked.ToJson(_nominalType, _writerSettings, _serializer, _configurator);
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <System.Type>(L, 2) && translator.Assignable <MongoDB.Bson.IO.JsonWriterSettings>(L, 3) && translator.Assignable <MongoDB.Bson.Serialization.IBsonSerializer>(L, 4))
                {
                    System.Type _nominalType = (System.Type)translator.GetObject(L, 2, typeof(System.Type));
                    MongoDB.Bson.IO.JsonWriterSettings         _writerSettings = (MongoDB.Bson.IO.JsonWriterSettings)translator.GetObject(L, 3, typeof(MongoDB.Bson.IO.JsonWriterSettings));
                    MongoDB.Bson.Serialization.IBsonSerializer _serializer     = (MongoDB.Bson.Serialization.IBsonSerializer)translator.GetObject(L, 4, typeof(MongoDB.Bson.Serialization.IBsonSerializer));

                    string gen_ret = gen_to_be_invoked.ToJson(_nominalType, _writerSettings, _serializer);
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <System.Type>(L, 2) && translator.Assignable <MongoDB.Bson.IO.JsonWriterSettings>(L, 3))
                {
                    System.Type _nominalType = (System.Type)translator.GetObject(L, 2, typeof(System.Type));
                    MongoDB.Bson.IO.JsonWriterSettings _writerSettings = (MongoDB.Bson.IO.JsonWriterSettings)translator.GetObject(L, 3, typeof(MongoDB.Bson.IO.JsonWriterSettings));

                    string gen_ret = gen_to_be_invoked.ToJson(_nominalType, _writerSettings);
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <System.Type>(L, 2))
                {
                    System.Type _nominalType = (System.Type)translator.GetObject(L, 2, typeof(System.Type));

                    string gen_ret = gen_to_be_invoked.ToJson(_nominalType);
                    LuaAPI.lua_pushstring(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 object.ToJson!"));
        }