public void Save() { ConfigFolder.CurrentDirectory().SaveJsonConfig("repo_cache", this); }
public static RepoCache Get() { return(_instance ??= ConfigFolder .CurrentDirectory() .GetJsonConfigOrDefault <RepoCache>("repo_cache")); }
/// <summary> /// Creates folder in its default storage point /// </summary> /// <param name="aFolder"> /// Folder name <see cref="ConfigFolder"/> /// </param> public static void CreateFolder (ConfigFolder aFolder) { if (IO.Directory.Exists(ConfigurationFolder) == false) IO.Directory.CreateDirectory (ConfigurationFolder); if (aFolder == null) return; if (IO.Directory.Exists(aFolder.Path) == false) IO.Directory.CreateDirectory (aFolder.Path); }
/// <summary> /// Creates master configuration /// </summary> /// <param name="aSerializableObjectType"> /// Default config type <see cref="System.Type"/> /// </param> /// <param name="aWatched"> /// Set true if configuration should be monitored for file changes <see cref="System.Boolean"/> /// </param> /// <returns> /// Config file created <see cref="ConfigFile"/> /// </returns> public static ConfigFile AddMasterConfiguration (System.Type aSerializableObjectType, bool aWatched) { ConfigFolder folder = GetMasterFolder(); if (folder == null) { folder = new ConfigFolder (""); list.Add (folder); } if (folder.Get("config.xml") != null) throw new Exception ("Master configuration already exists"); folder.Add (aSerializableObjectType, aWatched); return (folder.Get ("config.xml")); }
public static ProjectCache Get() { return(_instance ??= ConfigFolder .CurrentDirectory() .GetJsonConfigOrDefault <ProjectCache>("project_cache")); }