AMT Help Files

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.

$Obj_Repos = $Obj_Module.OpenConnection([LionDatabaseType]::MsSql, "MSSQL_SERVER", "Username", "Password", "REPOS_DB", "", <UseSSL $true|$false>, "ReposTestProgram")

 

Create an Object of the IApplication Interface for the application to generate.

$Obj_CustMan = $Obj_Repos.GetApplication("CUSTOMER_MANAGEMENT")

 

Create an object of the ILionGenSet Interface for the generation set to use while generating.

$Obj_CMDev = $Obj_CustMan.GetGenSet("Development")

 

Create an object of the ILionGenerate Interface to be able to start the actual generation.

$Obj_CMGen = $Obj_CustMan.GetGenerate($Obj_CMDev)

 

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.

 

$Obj_CMGen.GenerateWholeSystem(<Wait $true|$false>)

 

All the possible interfaces, their properties and methods can be found in Interfaces section.

The LionRepository Module requires PowerShell 7.4.1 or higher when using the Module in a PowerShell script.
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.

ILionRepository obj_Repos = obj_Module.OpenConnection(LionDatabaseType.MsSql, "MSSQL_SERVER", "Username", "Password", "REPOS_DB", "", <UseSSL true|false>, "ReposTestProgram");

 

Create an Object of the IApplication Interface for the application to generate.

ILionApplication obj_CustMan = obj_Repos.GetApplication("CUSTOMER_MANAGEMENT");

 

Create an object of the ILionGenSet Interface for the generation set to use while generating.

ILionGenSet obj_CMDev = obj_CustMan.GetGenSet("Development");

 

Create an object of the ILionGenerate Interface to be able to start the actual generation.

ILionGenerate obj_CMGen = obj_CustMan.GetGenerate(obj_CMDev);

 

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.

obj_CMGen.GenerateWholeSystem(<Wait true|false>);

 

All the possible interfaces, their properties and methods can be found in Interfaces section.