Application Setup
Jump to navigation
Jump to search
MariaApplication singleton
The TPG.GDK.Maria.Common.MariaApplication is a Singleton class which sets up some application wide properties and facilities, such as data paths and logging. This class need not be explicitly instantiated unless you have particular requirements for the input parameters. See the code doc for list of available constructor parameters.
Application shutdown
To ensure a clean shutdown you should call MariaApplication.Shutdown() before on application exit. For example:
public ICommand ExitCommand
{
get { return new DelegateCommand(x => ApplicationShutdown()); }
}
private void ApplicationShutdown()
{
MariaApplication.Instance.Shutdown();
Application.Current.Shutdown();
}