Exemple #1
0
        public T Load(string fileName = Global.DefaultFilename)
        {
            var settings = (T)Activator.CreateInstance(typeof(T), _file);

            if (_file.Exists(fileName))
            {
                settings = JsonConvert.DeserializeObject <T>(_file.ReadAllText(fileName));
            }
            return(settings);
        }