Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Globals
Overview
GlobalConfig and related singletons live in this package. They provide canonical paths (Configs, Services, Logs, Localization, Databases, Queues, Plugins, Emails), installation flags, default connection strings and helpers used throughout the Eltheon runtime.
Key Features
GlobalConfig.Initialize(path)resolves canonical paths without creating legacy directories; callers that intentionally need legacy standalone directories must passensureDirectories: true.- Exposes default connection strings for SQL Server, MySQL and SQLite installers.
- Works hand-in-hand with the ConfigFiles feature to load typed configuration objects (
GlobalConfig.Configs()).
Usage
GlobalConfig.Initialize("/var/eltheon", ensureDirectories: false);
var config = GlobalConfig.Instance;
if (!config.IsInstalled) { /* run installer */ }
Call Initialize as early as possible (typically before building the web host) so every feature can resolve file-system paths. Normal runtime hosts should keep directory creation disabled; installer or standalone legacy flows may opt in explicitly.
Notes
- The package uses Newtonsoft.Json to create default localization files when the directory is missing.
- Because it’s a singleton, treat
GlobalConfigas application-wide state. Avoid callingInitializemultiple times with different paths in the same process.