Esempio n. 1
0
        public virtual void LoadSettings()
        {
            Settings = _dataSaver.GetData <TSettings>(_config.SettingsPath).GetAwaiter().GetResult();
            if (Settings == null)
            {
                throw new System.Exception("Cannot read settings");
            }

            // validate
            Settings.Validate();
        }
 public override string GetData(string target, string key)
 {
     return(_serializer.GetData(target, key));
 }
Esempio n. 3
0
 public async Task <T> GetData <T>(string id) where T : class
 {
     return(await _dataSaver.GetData <T>(id));
 }