Documentation for variables available to preset tasks

Posts   
 
    
basik
User
Posts: 123
Joined: 20-Aug-2012
# Posted on: 03-May-2013 15:23:58   

Hi,

I'm finding the template documentation a little sparse is some areas - LLBLGEN 3.5. When adding template tasks to a preset there are [parameter] type variables which are available but I can't seem to find a definitive list of what is available.

Is this information available somewhere? These are the parameters I have found by looking at various templates in the Entity Framework v5 preset: [driverShortName] [containerName] [elementName]

For example I'd like to include a project namespace as part of the filenameFormat property of an LPT template task. So is there a parameter for this?

I tried [rootNamespaceToUse] but it failed. Possibly there is another way to control the naming of the file that a template produces, that allows more control.

Thank you.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 04-May-2013 00:11:13   

The parameters of the shipped Taks Performers are explained at SDK Docs.

And, copied from that link:

The placeholders recognized in file names are:

[extension]. Replaced with the extension defined in the target language's .language file. Used to specify code file extensions.

[time]. Replaced with the actual current time in the format: yyyyMMdd-HHmmss

[containerName]. Replaced with the ActiveSourceElementsContainerName value of the executing Generator object, which is the projectname when the project property GroupUsage is set to AsVisualGroupingMechanism, otherwise it's the active group name.

[elementName]. Replaced with the name of the element, e.g. the name of the current entity.

So: no, you can't use the root namespace as part of the fileName in the CodeEmitter task performer. The ProjectFileCreator task performes does recognize additional placeHolders. So if you really want that, you should write your own task performer for that.

David Elizondo | LLBLGen Support Team