Reflection 从表中查找所有显示方法

Reflection 从表中查找所有显示方法,reflection,axapta,dynamics-ax-2009,x++,Reflection,Axapta,Dynamics Ax 2009,X++,我需要将一个表中的所有显示方法放入缓存,因此我尝试动态地输入,而不是手动输入(有很多显示方法),即浏览表中的每个方法,然后检查它是否是一个显示方法,以获取tablemethodstr(),并使用cacheAddMethod()将其放入缓存在表单数据源上 但是,我找不到一种使用属性过滤方法的方法,所以我想知道在AX2009中使用纯X++是否有可能做到这一点 干杯我刚刚写了一份工作,可能会帮你得到你需要的东西。我不完全确定这个问题,但您应该能够运行以下程序: static void Job46(Ar

我需要将一个表中的所有显示方法放入缓存,因此我尝试动态地输入,而不是手动输入(有很多显示方法),即浏览表中的每个方法,然后检查它是否是一个显示方法,以获取
tablemethodstr()
,并使用
cacheAddMethod()将其放入缓存
在表单数据源上

但是,我找不到一种使用属性过滤方法的方法,所以我想知道在AX2009中使用纯X++是否有可能做到这一点


干杯

我刚刚写了一份工作,可能会帮你得到你需要的东西。我不完全确定这个问题,但您应该能够运行以下程序:

static void Job46(Args _args)
{
    DictTable       dictTable;
    int             i;
    MethodInfo      methodInfo;
    SysDictTable    dt = new sysDictTable(tableNum(Address));
    ;

    dictTable = new dictTable(TableNum(Address));

    for (i=1; i<dt.objectMethodCnt(); i++)
    {
        methodInfo = dt.objectMethodObject(i);

        if (methodInfo.displayType() == DisplayFunctionType::Get)
            info(strfmt("Found Display: %1 - %2 - %3", methodInfo.displayType(), enum2str(methodInfo.returnType()), methodInfo.name()));
        else
            info(strfmt("Not Display: %1 - %2 - %3", methodInfo.displayType(), enum2str(methodInfo.returnType()), methodInfo.name()));
    }
}
static void Job46(Args\u Args)
{
可听写的可听写的;
int i;
方法信息方法信息;
SysDictTable dt=新的SysDictTable(tableNum(地址));
;
dictTable=新的dictTable(TableNum(Address));
对于(i=1;i