C# Класс Habanero.Base.HabaneroApp

The base class for a HabaneroAppUI and HabaneroAppConsole, two classes to kick start an application built using the Habanero libraries.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_applicationVersionUpgrader IApplicationVersionUpgrader

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
LogAppStartingInfo ( IHabaneroLogger log ) : void

Описание методов

HabaneroApp() публичный Метод

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
Результат System

SetupApplicationNameAndVersion() защищенный Метод

Sets the GlobalRegistry ApplicationName and ApplicationVersion from AppName and AppVersion.
protected SetupApplicationNameAndVersion ( ) : void
Результат void

SetupClassDefs() защищенный абстрактный Метод

Loads the class definitions
protected abstract SetupClassDefs ( ) : void
Результат void

SetupDatabaseConnection() защищенный абстрактный Метод

Sets up the database connection. If not provided, then reads the connection from the config file.
protected abstract SetupDatabaseConnection ( ) : void
Результат void

SetupExceptionNotifier() защищенный абстрактный Метод

Sets up the exception notifier used to display exceptions to the final user. If not specified, assumes the FormExceptionNotifier.
protected abstract SetupExceptionNotifier ( ) : void
Результат void

SetupLogging() защищенный Метод

Sets up logging using Log4net. If you want to use your own logging component override this.
protected SetupLogging ( ) : void
Результат void

SetupSettings() защищенный абстрактный Метод

Initialises the settings. If not provided, DatabaseSettings is assumed.
protected abstract SetupSettings ( ) : void
Результат void

Startup() публичный Метод

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
Результат bool

Upgrade() защищенный Метод

Upgrades an application's database where an application upgrader has been provided. See IApplicationVersionUpgrader.
protected Upgrade ( ) : void
Результат void

Описание свойств

_applicationVersionUpgrader защищенное свойство

The application version upgrader. Override this if you want to perform upgrade maneuvres on startup.
protected IApplicationVersionUpgrader _applicationVersionUpgrader
Результат IApplicationVersionUpgrader