ILionRepository
This section details the functions and properties of the AMT-COBOL Repository Module Repository interface.
Properties
| Name | Type | Access | Description | 
| UserName | String | Read only | Returns the username of the running program. | 
Functions
| Function name | Return type | Parameters | Description | |
| Name | Type | |||
| CloseConnection | Void | Closes any open connection to the repository. | ||
| GetApplication | ILionApplication Object | ApplicationName | String | Returns the specified application from the repository as a ILionApplication object, returns null when the specified application is not found. | 
| GetApplications | List of ILionApplication Objects | Returns a list of all available applications in the repository. | ||
| GetApplications2 | Array of ILionApplication Objects | Returns an array of all available applications in the repository. | ||
| GetSecurity | ILionReposSecurity Object | Returns the security settings of the repository as a ILionReposSecurity object. | ||
| GetReposImport | ILionReposImport Object |  | Returns an object of the ILionReposImport interface. | |
| Reorganize | Void | Reorganizes the AMT Repository to the newest version. Messages reporting the current and new repository version will be displayed. If the database is empty, a message stating that a new database will be created is also displayed. | ||
Examples
C#
| Log("Connected under:
                " + repos.UserName); foreach (ILionApplication app in repos.GetApplications()) { Log("Application: " + app.Name); // Other actions on <app> ILionApplication app2 = repos.GetApplication("DEMO2"); if (app2 != null) { Log("Single app: " + app2.Name); } repos.Reorganize(); repos.CloseConnection(); | 
PowerShell
| Write-host("Connected under:
                        "
                    + $O_Repos.UserName) foreach ($O_App in $O_Repos.GetApplications()) { Write-Host("Application: " + $O_App.Name) # Other actions on $O_App } $O_App2 = $O_Repos.GetApplication("DEMO2") if ($O_App2) { Write-Host("Single app: " + $O_App2.Name) } $O_Repos.Reorganize() $O_Repos.CloseConnection() | 
