LuaInterface.ObjectTranslator.getConstructorSignature C# (CSharp) Méthode

getConstructorSignature() private méthode

private getConstructorSignature ( IntPtr luaState ) : int
luaState System.IntPtr
Résultat int
        private int getConstructorSignature(IntPtr luaState)
        {
            IReflect klass=null;
            int udata=LuaDLL.luanet_checkudata(luaState,1,"luaNet_class");
            if(udata!=-1)
            {
                klass=(IReflect)objects[udata];
            }
            if(klass==null)
            {
                throwError(luaState,"get_constructor_bysig: first arg is invalid type reference");
            }
            Type[] signature=new Type[LuaDLL.lua_gettop(luaState)-1];
            for(int i=0;i<signature.Length;i++)
                signature[i]=FindType(LuaDLL.lua_tostring(luaState,i+2));
            try
            {
                ConstructorInfo constructor=klass.UnderlyingSystemType.GetConstructor(signature);
                pushFunction(luaState,new LuaCSFunction((new LuaMethodWrapper(this,null,klass,constructor)).call));
            }
            catch(Exception e)
            {
                throwError(luaState,e);
                LuaDLL.lua_pushnil(luaState);
            }
            return 1;
        }