public static void Load() { var builder = new ConfigurationBuilder() .AddJsonFile("appsettings.json", false, true) .AddJsonFile("appsettings.env.json", true, true); Config = builder.Build(); Token = Config.GetReloadToken(); Token.RegisterChangeCallback(OnChange, null); OnLoad?.Invoke(); }
public static void OnChange(object state) { OnReLoad?.Invoke(); }