Dynamically class addition

Registration of classes at startup of the Cooker

Embedded class .dll files placed in the specified directory are dynamically loaded when the Cooker is started.

The following sections describe registration of classes at startup.

File name

The Cooker determines whether it is an embedded class by the file name. Therefore, .dll files of embedded class must follow the specified naming rule.

The naming rule (file name pattern) is shown below.


For example

If it is a .dll file for datetime class, the file name is "Rtype.Datetime.dll".

If it is a .dll file for regex (Regular expression) class, the file name is "Rtype.Regex.dll".

If file name do not follow this naming rule, class will not be registered.

dlls directory

The Cooker dynamically loads embedded classes from the dlls directory at startup.

The dlls directory must be a child directory of the directory where contains the Cooker.exe. In other words, the dlls directory must be in the same directory as Cooker.exe.

As explained above, it judges by file name whether it is an embedded class or not.

Embedded class must be placed in the dlls directory, but, it does not have to be direct child of the dlls directory.

Searching for embedded class is done recursively for the dlls directory. In other words, embedded class is loaded dynamically if it is somewhere in the directory hierarchy under the dlls directory.

Copyright © Cooker All rights reserved.