Table of Contents

Class LocalApp

Namespace
Hi.HiNcKits
Assembly
HiNc.dll

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

string

Properties

LocalAppConfig

Gets or sets the host configuration.

public static LocalAppConfig LocalAppConfig { get; set; }

Property Value

LocalAppConfig

Methods

AppBegin(LocalAppConfig, ILogger)

Initializes the application with the specified configuration.

public static void AppBegin(LocalAppConfig localAppConfig, ILogger logger)

Parameters

localAppConfig LocalAppConfig

The local application configuration.

logger ILogger

Logger 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

logger ILogger

Logger instance for startup diagnostics.

cacheDbPath string

The 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

logger ILogger

Logger used when loading configuration and initializing caches.

hostConfigPath string

Path 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()