/// <summary> /// Retrieves an instance managing the passed settings file /// </summary> /// <remarks> /// <code> /// var manager = Get("Settings"); /// </code> /// Will return a manager dealing with Settings\Settings.json /// </remarks> /// <param name="parParent">The name of the settings file</param> /// <returns>OptionManager instance</returns> public static OptionManager Get(string parParent) { var tmpManager = _Managers.FirstOrDefault(i => i.Name == parParent); if (tmpManager != null) { return(tmpManager); } tmpManager = new OptionManager(parParent); _Managers.Add(tmpManager); return(tmpManager); }
internal void Save() { OptionManager.Get("Settings").SaveToJson(this); }
internal void Load() { Values = OptionManager.Get("Settings").LoadFromJson <Options>(); }