Using the LionRepository Module
Shown below is a simple example of how to connect to a Repository, select an Application and Generation Set and then
Generate the Whole Application using that Generation Set. The example is described in the languages Powershell and C#
(.NET).
PowerShell
Connect to the Repository Database by setting the LionRepository module to use the correct Database Server and Database. For security reasons login information has to be supplied.
Create an Object of the IApplication Interface for the application to generate.
Create an object of the ILionGenSet Interface for the generation set to use while generating.
Create an object of the ILionGenerate Interface to be able to start the actual generation.
The actual Whole System Generation for the ILionGenerate object. When <Wait> is set to $true, the method will wait for the generation to end before returning and the result will be returned as Boolean, otherwise it will return immediately.
All the possible interfaces, their properties and methods can be found in Interfaces section.
From AMT 80 onwards the LionRepository Module requires PowerShell 7.4.1 or higher when using the Module in a PowerShell script. This is due to the gradual migration of AMT to the .NET Core platform. Information on how to download, install and use PowerShell 7.4.1 can be found on the Microsoft PowerShell website. |
C# (.NET)
Connect to the Repository Database by setting the LionRepository module to use the correct Database Server and Database. For security reasons login information has to be supplied.
Create an Object of the IApplication Interface for the application to generate.
Create an object of the ILionGenSet Interface for the generation set to use while generating.
Create an object of the ILionGenerate Interface to be able to start the actual generation.
The actual Whole System
Generation for the ILionGenerate object. When <Wait> is set to true, the method will wait for the generation to
end before returning
and the result will be returned as Boolean, otherwise it will return
immediately.
All the possible interfaces, their properties and methods can be found in Interfaces section.