Class LocalApp
Local application initialization and cleanup utilities.
public static class LocalApp
- Inheritance
-
LocalApp
- Inherited Members
Fields
DefaultLocalAppConfigPath
Path to the configuration file.
public const string DefaultLocalAppConfigPath = "hinc-host-config.xml"
Field Value
Properties
LocalAppConfig
Gets or sets the host configuration.
public static LocalAppConfig LocalAppConfig { get; set; }
Property Value
Methods
AppBegin(LocalAppConfig, ILogger)
Initializes the application with the specified configuration.
public static void AppBegin(LocalAppConfig localAppConfig, ILogger logger)
Parameters
localAppConfigLocalAppConfigThe local application configuration.
loggerILoggerLogger used for startup diagnostics.
AppBegin(ILogger, string)
Initializes the application with the specified cache database path.
public static void AppBegin(ILogger logger, string cacheDbPath = null)
Parameters
loggerILoggerLogger instance for startup diagnostics.
cacheDbPathstringThe path to the SQLite cache database. If null, uses default path.
AppBeginWithConfigFile(ILogger, string)
Initializes the application with configuration from a file.
public static void AppBeginWithConfigFile(ILogger logger, string hostConfigPath = null)
Parameters
loggerILoggerLogger used when loading configuration and initializing caches.
hostConfigPathstringPath to the host configuration file. Uses default path if null.
AppEnd()
Cleans up the application by stopping services and logging out licenses. Call it LAST – after the host has stopped serving and disposed everything that drives the native core (display engines, the project service with its play and workpiece trees). On Linux, exit() runs the native library's static destructors while any thread still inside it keeps running, so every native caller has to be finished before Main returns; hooking this at the START of a host's shutdown (ASP.NET Core's ApplicationStopping) is what crashed HiNC-1 on four deploy stops in 2026-09.
public static void AppEnd()