Getting started

This documentation contains brief descriptions about how things work, the reference manual describes the details for accessing LLBLGen Pro internal elements and the included source code helps you further to look at the internal elements of LLBLGen Pro and will give you ideas how to extend LLBLGen Pro.

Not everything is opened up and not everything is described in detail. This SDK documentation focuses on the code generation system, and all elements discussed in this SDK are related to that system.

The SDK however will give you insight in how the code generation process works in detail and it will be possible for you to extend this process or simply modify this process to meet your requirements. LLBLGen Pro's designer is used to define definitions for various types of elements: e.g. entities, typed lists, typed views, value type definitions and stored procedure calls.

How these definitions are realized in code is up to the generator process, or more specifically, the elements used by the generator process. This way, the contents of this SDK is very important to the customization of LLBLGen Pro's generated code.

How to successfully use this SDK

It's important that you understand how the generator process works and how the template system works in conjunction with the generator process. These elements are not related to any set of templates or task performer, they use templates and task performers. In other words: once you know how the system works, you can add your own templates and task performers to generate/perform what you want.

To be able to modify the current templates for C# and VB.NET, you have to have a brief understanding how the generated code works in relation to the ORM support classes. This way you will be able to modify the right templates.

The source code included in this SDK is very important for the full understanding of the generation process and successful implementations of own task performers, TDL extensions and template additions. The source code is in C# and well documented with comments. Perhaps the parser and lexical analyzer are a bit farfetched for some people, for others they might be welcome tools. It's important to take your time with the source code, the reference manual and this documentation, since the whole mechanism can feel somewhat complex.

If you've decided to start altering templates or taskperformers, keep in mind that LLBLGen Pro's development will cause changes to these elements in the future. It is important that you always work with copies of the original elements, so when you have to upgrade to a newer version because of bugfixes or feature enhancements, you will not lose your customized work. It is therefore important that you use your own template files, template bindings, your own presets etc.

Although the main focus of this SDK is on the generation process, because you need information about all the elements in the project, the complete reference manual for the 'ApplicationCore' assembly is available. Reading that reference manual will show you that you can create new tools using just this assembly, for example a command-line tool to refresh a project or to generate code.

All required assemblies are available in your LLBLGen Pro installation directory, so when you need to make a reference to for example the ApplicationCore assembly, you should make a reference to the assembly found in the LLBLGen Pro installation folder. LLBLGen Pro also ships with a plug-in called Project inspector, which is runnable on a Project in the Project explorer. It will open a detailed view of the object graph of the project, so you can more easily check which properties and objects to target in your .lpt templates.

Inside the designer, you can execute small pieces of C# or VB.NET code in the Element Search. This way, you can test out code which you can use inside .lpt templates as well. This could be a simple way to get more understanding of the object model available to you.