Example #1
0
        public static bool IsDefault(Type pluginType) // This might fit better in the Plugin class.
        {
            var list = JSONSerialization.DeserializeFile <List <string> >(DefaultPluginsPath);

            if (list == null)
            {
                list = new List <string>(_standardPlugins.Select(x => Plugin.GetFullName(x)));
                JSONSerialization.SerializeObject(list, DefaultPluginsPath);
            }
            return(list.Contains(Plugin.GetFullName(pluginType)));
        }
Example #2
0
 private void Save()
 {
     JSONSerialization.SerializeObject(Users, FilePath);
 }
Example #3
0
 public void Save(string path)
 {
     JSONSerialization.SerializeObject(this, path);
 }
 public void SetValue(string path, object value)
 {
     Log.Data($"Storing JSON data {value} at '{path}'.");
     JSONSerialization.SerializeObject(value, GetPath() + path);
 }
Example #5
0
 private static void StoreTranslationTable(CultureInfo culture, string identifier)
 {
     JSONSerialization.SerializeObject(_translationTable[culture][identifier], LocalizationsDirectory + "/" + FormatName(culture, identifier));
 }
Example #6
0
 private void Save()
 {
     JSONSerialization.SerializeObject(_users, _filePath);
 }