public virtual void Save() { if (cfg == null) { cfg = ConfigElement.GetAll(GetType()); } using (StreamWriter w = new StreamWriter(PropsPath)) { w.WriteLine("#" + GameName + " configuration"); ConfigElement.SerialiseElements(cfg, w, this); } }
public void Save() { if (cfg == null) { cfg = ConfigElement.GetAll(typeof(DiscordConfig)); } using (StreamWriter w = new StreamWriter(PROPS_PATH)) { w.WriteLine("# Discord relay bot configuration"); w.WriteLine("# See " + Updater.SourceURL + "/wiki/Discord-relay-bot/"); w.WriteLine(); ConfigElement.SerialiseElements(cfg, w, this); } }