• API Documentation

BuildSystem manager objects

Manager objects of the build system are classes that define the logic for performing specific operations on projects. They are grouped by the operations they perform — each manager object can execute the same operation differently.

Control objects adhere to the following rules:

  • Each type of manager object has its own interface implementing IManagerProp. This interface defines the rules for working with the settings of the manager object.
  • Each type of manager object has its own factory — the factory returns an implementation based on the specified type.
  • They have only stateless methods - the result of a method does not change based on previously called methods. The object only stores general properties for its operation.

Existed types

  • Builder - сompiles the project, may also refer to another task, such as conversion from tlb;
  • Cleaner - deletes the compilation results of the project;
  • GenDoc - converts XML files obtained during compilation into human-readable project documentation;
  • GenLang - creates .lng file using utility written on Delphi;
  • HashGenerator - creates hash value for the list of sources;
  • PackageManager - interacts with the package repository, such as nuget.org and so on;
  • ProjectCache - reduces the number of actions by using a caching mechanism;
  • Reclaimer - removes old package versions according to the strategies;
  • Restorer - restores package dependencies;
  • Signer - signs build results;
  • TlbGenBpl - creates .BPL file from .IDL;
  • TlbGenDotnetDll - creates maanged .DLL file from .IDL;
  • TlbGenPas - creates .PAS file from .IDL;
  • VersionManager - determines package version numbers.

Custom implementation of a BuildSystem manager object

Within the BuildSystem, you can create custom manager objects that implement logic specific to the current build.

  • Implement a class that inherits class from IManagerProp (like ISignerProp);
public class SignerCustomProps : SignerProps
{
    // some your own params
}
  • Implement a class that inherits from IManager (like ISigner);
public class SignerCustom: ISigner
{
    public ILogger Logger { get; }
    public SignerCustom(ILogger logger, ISignerProps props, string tempDir)
    {
        Logger = logger;
    }
 
    public bool SignBinary(string binFile)
    {
        // some your own logic
        return true;
    }
}
  • Register in GlobalFactory
GlobalFactory.Builder.RegisterAssembly<SignerCustom, SignerCustomProps>();
In This Article
Back to top Generated by DocFX