void Update() { var keys = Map.Keys; var count = keys.Count; var nu = DateTime.Now; var ekill = new List <string>(); foreach (string key in keys) { var entry = Map[key]; int maxtime = ((entry.Modifications * 2) - count) + 1; int time = (int)nu.Subtract(entry.Modified).TotalMinutes; if (time > maxtime || count > 5) { Chat($"Entry {key} is over time ({time} minutes elapsed, and {maxtime} were allowed). This entry was since put in RAM modified {entry.Modifications} time(s)"); if (entry.Modifications > 0) { QuickStream.SaveString(TagFile(key), entry.ToString()); } ekill.Add(key); } } foreach (string key in ekill) { Map.Kill(key); } }
public void SaveSource(string file) => QuickStream.SaveString(file, ToSource());
/// <summary>Save as a source file (editable in text editors)</summary> /// <seealso cref="ToSource"/> public void SaveSource(string filename) { var src = ToSource(); QuickStream.SaveString(filename, src); }
public static void SaveString(string filename, string thestring) { d(); QuickStream.SaveString(filename, thestring); }