Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public void SaveSource(string file) => QuickStream.SaveString(file, ToSource());
Ejemplo n.º 3
0
        /// <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);
        }
Ejemplo n.º 4
0
 public static void SaveString(string filename, string thestring)
 {
     d(); QuickStream.SaveString(filename, thestring);
 }