static int _g_get_Options(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                MongoDB.Bson.BsonRegularExpression gen_to_be_invoked = (MongoDB.Bson.BsonRegularExpression)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushstring(L, gen_to_be_invoked.Options);
            } 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.BsonRegularExpression>(L, 3))
                {
                    string _lexeme = LuaAPI.lua_tostring(L, 2);
                    MongoDB.Bson.BsonRegularExpression _value = (MongoDB.Bson.BsonRegularExpression)translator.GetObject(L, 3, typeof(MongoDB.Bson.BsonRegularExpression));

                    MongoDB.Bson.IO.RegularExpressionJsonToken gen_ret = new MongoDB.Bson.IO.RegularExpressionJsonToken(_lexeme, _value);
                    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.RegularExpressionJsonToken constructor!"));
        }
        static int __EqMeta(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                if (translator.Assignable <MongoDB.Bson.BsonRegularExpression>(L, 1) && translator.Assignable <MongoDB.Bson.BsonRegularExpression>(L, 2))
                {
                    MongoDB.Bson.BsonRegularExpression leftside  = (MongoDB.Bson.BsonRegularExpression)translator.GetObject(L, 1, typeof(MongoDB.Bson.BsonRegularExpression));
                    MongoDB.Bson.BsonRegularExpression rightside = (MongoDB.Bson.BsonRegularExpression)translator.GetObject(L, 2, typeof(MongoDB.Bson.BsonRegularExpression));

                    LuaAPI.lua_pushboolean(L, leftside == rightside);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to right hand of == operator, need MongoDB.Bson.BsonRegularExpression!"));
        }
        static int _m_Create_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    object _value = translator.GetObject(L, 1, typeof(object));

                    MongoDB.Bson.BsonRegularExpression gen_ret = MongoDB.Bson.BsonRegularExpression.Create(_value);
                    translator.Push(L, gen_ret);



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


                MongoDB.Bson.IO.BsonDocumentReader gen_to_be_invoked = (MongoDB.Bson.IO.BsonDocumentReader)translator.FastGetCSObj(L, 1);



                {
                    MongoDB.Bson.BsonRegularExpression gen_ret = gen_to_be_invoked.ReadRegularExpression(  );
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #6
0
        static int _m_ReadRegularExpression_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.BsonRegularExpression gen_ret = MongoDB.Bson.IO.IBsonReaderExtensions.ReadRegularExpression(_reader, _name);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #7
0
        static int _m_WriteRegularExpression_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.BsonRegularExpression _regex = (MongoDB.Bson.BsonRegularExpression)translator.GetObject(L, 3, typeof(MongoDB.Bson.BsonRegularExpression));

                    MongoDB.Bson.IO.IBsonWriterExtensions.WriteRegularExpression(_writer, _name, _regex);



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


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



                {
                    int gen_ret = gen_to_be_invoked.GetHashCode(  );
                    LuaAPI.xlua_pushinteger(L, gen_ret);



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


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


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <MongoDB.Bson.BsonRegularExpression>(L, 2))
                {
                    MongoDB.Bson.BsonRegularExpression _rhs = (MongoDB.Bson.BsonRegularExpression)translator.GetObject(L, 2, typeof(MongoDB.Bson.BsonRegularExpression));

                    bool gen_ret = gen_to_be_invoked.Equals(_rhs);
                    LuaAPI.lua_pushboolean(L, gen_ret);



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

                    bool gen_ret = gen_to_be_invoked.Equals(_obj);
                    LuaAPI.lua_pushboolean(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.BsonRegularExpression.Equals!"));
        }
        static int _m_CompareTo(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <MongoDB.Bson.BsonRegularExpression>(L, 2))
                {
                    MongoDB.Bson.BsonRegularExpression _other = (MongoDB.Bson.BsonRegularExpression)translator.GetObject(L, 2, typeof(MongoDB.Bson.BsonRegularExpression));

                    int gen_ret = gen_to_be_invoked.CompareTo(_other);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <MongoDB.Bson.BsonValue>(L, 2))
                {
                    MongoDB.Bson.BsonValue _other = (MongoDB.Bson.BsonValue)translator.GetObject(L, 2, typeof(MongoDB.Bson.BsonValue));

                    int gen_ret = gen_to_be_invoked.CompareTo(_other);
                    LuaAPI.xlua_pushinteger(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.BsonRegularExpression.CompareTo!"));
        }
        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 _pattern = LuaAPI.lua_tostring(L, 2);

                    MongoDB.Bson.BsonRegularExpression gen_ret = new MongoDB.Bson.BsonRegularExpression(_pattern);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING))
                {
                    string _pattern = LuaAPI.lua_tostring(L, 2);
                    string _options = LuaAPI.lua_tostring(L, 3);

                    MongoDB.Bson.BsonRegularExpression gen_ret = new MongoDB.Bson.BsonRegularExpression(_pattern, _options);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <System.Text.RegularExpressions.Regex>(L, 2))
                {
                    System.Text.RegularExpressions.Regex _regex = (System.Text.RegularExpressions.Regex)translator.GetObject(L, 2, typeof(System.Text.RegularExpressions.Regex));

                    MongoDB.Bson.BsonRegularExpression gen_ret = new MongoDB.Bson.BsonRegularExpression(_regex);
                    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.BsonRegularExpression constructor!"));
        }
        static int _m_WriteRegularExpression(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.IO.BsonDocumentWriter gen_to_be_invoked = (MongoDB.Bson.IO.BsonDocumentWriter)translator.FastGetCSObj(L, 1);



                {
                    MongoDB.Bson.BsonRegularExpression _regex = (MongoDB.Bson.BsonRegularExpression)translator.GetObject(L, 2, typeof(MongoDB.Bson.BsonRegularExpression));

                    gen_to_be_invoked.WriteRegularExpression(_regex);



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