NuGet · nuget

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Globals

Global Singletons for Eltheon Framework

Install

Install-Kommandos

dotnet add package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Globals --version 2.9.0.5
<PackageReference Include="Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Globals" Version="2.9.0.5" />
paket add Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Globals --version 2.9.0.5
Install-Package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Globals -Version 2.9.0.5

README

Vorschau

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 pass ensureDirectories: 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 GlobalConfig as application-wide state. Avoid calling Initialize multiple times with different paths in the same process.