C# Class Habanero.Base.HabaneroApp

The base class for a HabaneroAppUI and HabaneroAppConsole, two classes to kick start an application built using the Habanero libraries.
Afficher le fichier Open project: Chillisoft/habanero

Protected Properties

Свойство Type Description
_applicationVersionUpgrader IApplicationVersionUpgrader

Méthodes publiques

Méthode Description
HabaneroApp ( string appName, string appVersion ) : System

Constructor to initialise a new application with basic application information. Use the Startup() method to launch the application.

Startup ( ) : bool

Launches the application, initialising the logger, the database configuration and connection, the class definitions, the exception notifier and the synchronisation controller. This method also carries out any version upgrades using the IApplicationVersionUpgrader, if specified.

Méthodes protégées

Méthode Description
SetupApplicationNameAndVersion ( ) : void

Sets the GlobalRegistry ApplicationName and ApplicationVersion from AppName and AppVersion.

SetupClassDefs ( ) : void

Loads the class definitions

SetupDatabaseConnection ( ) : void

Sets up the database connection. If not provided, then reads the connection from the config file.

SetupExceptionNotifier ( ) : void

Sets up the exception notifier used to display exceptions to the final user. If not specified, assumes the FormExceptionNotifier.

SetupLogging ( ) : void

Sets up logging using Log4net. If you want to use your own logging component override this.

SetupSettings ( ) : void

Initialises the settings. If not provided, DatabaseSettings is assumed.

Upgrade ( ) : void

Upgrades an application's database where an application upgrader has been provided. See IApplicationVersionUpgrader.

Private Methods

Méthode Description
LogAppStartingInfo ( IHabaneroLogger log ) : void

Method Details

HabaneroApp() public méthode

Constructor to initialise a new application with basic application information. Use the Startup() method to launch the application.
public HabaneroApp ( string appName, string appVersion ) : System
appName string The application name
appVersion string The application version
Résultat System

SetupApplicationNameAndVersion() protected méthode

Sets the GlobalRegistry ApplicationName and ApplicationVersion from AppName and AppVersion.
protected SetupApplicationNameAndVersion ( ) : void
Résultat void

SetupClassDefs() protected abstract méthode

Loads the class definitions
protected abstract SetupClassDefs ( ) : void
Résultat void

SetupDatabaseConnection() protected abstract méthode

Sets up the database connection. If not provided, then reads the connection from the config file.
protected abstract SetupDatabaseConnection ( ) : void
Résultat void

SetupExceptionNotifier() protected abstract méthode

Sets up the exception notifier used to display exceptions to the final user. If not specified, assumes the FormExceptionNotifier.
protected abstract SetupExceptionNotifier ( ) : void
Résultat void

SetupLogging() protected méthode

Sets up logging using Log4net. If you want to use your own logging component override this.
protected SetupLogging ( ) : void
Résultat void

SetupSettings() protected abstract méthode

Initialises the settings. If not provided, DatabaseSettings is assumed.
protected abstract SetupSettings ( ) : void
Résultat void

Startup() public méthode

Launches the application, initialising the logger, the database configuration and connection, the class definitions, the exception notifier and the synchronisation controller. This method also carries out any version upgrades using the IApplicationVersionUpgrader, if specified.
public Startup ( ) : bool
Résultat bool

Upgrade() protected méthode

Upgrades an application's database where an application upgrader has been provided. See IApplicationVersionUpgrader.
protected Upgrade ( ) : void
Résultat void

Property Details

_applicationVersionUpgrader protected_oe property

The application version upgrader. Override this if you want to perform upgrade maneuvres on startup.
protected IApplicationVersionUpgrader _applicationVersionUpgrader
Résultat IApplicationVersionUpgrader