Redeon.SuperSiteEngineCore.Web.Eltheon.Core.ConfigFiles
Overview
This package manages hierarchical configuration for Eltheon. It contains base config file abstractions, serializers, discovery helpers, and the extension methods used by GlobalConfig to load strongly typed configuration objects from disk.
Capabilities
BaseConfigFile<T>handles JSON persistence (with polymorphic support) and path management usingGlobalConfig.ConfigsFilekeeps a list of discoveredIConfigimplementations.GlobalConfig.Configs()bootstraps this file and scans all loaded assemblies for classes implementingIConfig.- Extension methods like
GlobalConfig.GetConfig<T>()allow any feature to fetch its config payload without knowing the storage layout.
Usage
- Ensure
GlobalConfig.Initialize(path)has been invoked so config directories exist. - Create a class implementing
IConfigand place it in any loaded assembly. - Call
GlobalConfig.Instance.Configs().Load()(or the provided extensions) to populate the config list, then query it viaGetConfig<T>().
Notes
- The package uses Newtonsoft.Json with
TypeNameHandling.Autoto persist polymorphic trigger/config types. Do not remove type metadata unless you control all config consumers. - Because the extension scans every loaded assembly, keep config classes lightweight to avoid large static initialization costs at startup.