C# Class OpenBveApi.Packages.Database

Stores the current package database
Exibir arquivo Open project: leezer3/OpenBVE

Public Properties

Property Type Description
currentDatabase PackageDatabase

Public Methods

Method Description
CheckUninstallDependancies ( List packagesToRemove ) : List

Checks whether uninstalling a package will break any dependancies

DependancyMet ( Package dependancy, List currentList ) : bool

Checks whether a dependancy is met by a member of a list of packages

LoadDatabase ( string Folder, string File ) : bool

Loads a package database XML file as the current database

SaveDatabase ( ) : bool

Call this method to save the package list to disk.

Returns false if an error was encountered whilst saving the database.

checkDependsReccomends ( List currentList ) : List

Checks a list of dependancies or reccomendations to see if they are installed

Method Details

CheckUninstallDependancies() public static method

Checks whether uninstalling a package will break any dependancies
public static CheckUninstallDependancies ( List packagesToRemove ) : List
packagesToRemove List The list of packages that will be removed
return List

DependancyMet() public static method

Checks whether a dependancy is met by a member of a list of packages
public static DependancyMet ( Package dependancy, List currentList ) : bool
dependancy Package The dependancy
currentList List The package list to check
return bool

LoadDatabase() public static method

Loads a package database XML file as the current database
public static LoadDatabase ( string Folder, string File ) : bool
Folder string The root database folder
File string The database file
return bool

SaveDatabase() public static method

Call this method to save the package list to disk.
Returns false if an error was encountered whilst saving the database.
public static SaveDatabase ( ) : bool
return bool

checkDependsReccomends() public static method

Checks a list of dependancies or reccomendations to see if they are installed
public static checkDependsReccomends ( List currentList ) : List
currentList List
return List

Property Details

currentDatabase public_oe static_oe property

The current package database
public static PackageDatabase,OpenBveApi.Packages currentDatabase
return PackageDatabase