Application Setup: Difference between revisions

From Maria GDK Wiki
Jump to navigation Jump to search
(Created page with "== 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...")
 
Line 3: Line 3:
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.
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
== Application shutdown ==


To ensure a clean shutdown you should call MariaApplication.Shutdown() before on application exit. For example:
To ensure a clean shutdown you should call MariaApplication.Shutdown() before on application exit. For example:

Revision as of 13:38, 25 February 2025

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();
        }