Getting Class extend list

There the code for display all classes who extend the class that you specify at the beginning:

static void MyGetClassList(Args _args)
{
    DictClass               dictClass;
    List                    listClass;
    ListEnumerator          listEnumerator;

    ClassId                 baseClass = classNum(TradeTotals);
    ;

    listClass = new DictClass(baseClass).extendedBy();

    listEnumerator = listClass.getEnumerator();

    while (listEnumerator.moveNext())
    {
        dictClass = new DictClass(listEnumerator.current());

        if (dictClass && !dictClass.isAbstract())
        {
            info(dictClass.name());
        }
    }
}
Advertisements

File listing – List all file in a folder

There is code for make a listing of all file in a folder :

static void myFileList(Args _args)
{
    FilePath                sFilePath;

    System.IO.DirectoryInfo di;
    System.IO.FileInfo[]    fis;
    System.IO.FileInfo      fi;
    int                     i;
    int                     l;
    ;

    sFilePath   = WinAPI::getTempPath();
    di          = new System.IO.DirectoryInfo(sFilePath);
    fis         = di.GetFiles();
    l           = fis.get_Length();
    
    for (i = 0; i < l; i++)
    {
        fi = fis.GetValue(i);
        info(fi.get_FullName());
    }
}