Ejemplo n.º 1
0
        private void SaveData()
        {
            foreach (KeyValuePair <string, byte[]> kvp in DataDisassembler)
            {
                //string data = Compression.ZipString(kvp.Value.ToString());
                ThreadsSave.Run(() => System.IO.File.WriteAllBytes(kvp.Key, kvp.Value), kvp.Key, true, true); //Tis was previously done
                //ThreadsSave.Run(() => File.WriteAllText(kvp.Key, data), kvp.Key, true, true);
            }
            //File.WriteAllText(kvp.Key, kvp.Value.ToString());

            ThreadsSave.JoinAll();
        }
Ejemplo n.º 2
0
        private void DisassemblyData()
        {
            DataDisassembler = new Dictionary <string, byte[]>();
            List <ServiceConfiguration.TimeFrame> Frames = Enums.ToList <ServiceConfiguration.TimeFrame>();

            foreach (string pair in this.Data.Keys)
            {
                foreach (ServiceConfiguration.TimeFrame frame in this.Data[pair].Keys)
                {
                    ThreadsSave.Run(() => this.UnloadRates(pair, frame), pair + frame, true, true);//ThreadsLoad.Run(() => this.Load(pair, frame), pair + frame, true, true);
                }
            }
            //this.UnloadRates(pair, frame);
            ThreadsSave.JoinAll();
        }