static void InitFastChange(FastChange fc)
 {
     for (int i = 0; i < (int)Constant.tassi.LAST_VALUE; i++)
     {
         string[] entry = ((Constant.tassi)i).ToString().Split('_');
         fc.addString(entry[0]);
         fc.addString(entry[1]);
     }
 }
示例#2
0
        public static void TestGraph2()
        {
            FastChange fc = new FastChange();

            for (int i = 0; i < (int)Constant.tassi.LAST_VALUE; i++)
            {
                string[] entry = ((Constant.tassi)i).ToString().Split('_');
                fc.addString(entry[0]);
                fc.addString(entry[1]);
            }

            Digraph d = new Digraph(fc.numberOfItems);

            for (int i = 0; i < (int)Constant.tassi.LAST_VALUE; i++)
            {
                string[] entry = ((Constant.tassi)i).ToString().Split('_');
                d.addEdge(entry[0], entry[1]);
                d.addEdge(entry[1], entry[0]);
            }
        }
        static void Main(string[] args)
        {
            Test.TestGraph();
            return;

            InitDictionary();
            InitValues();
            //PrintValues();
            FastChange fc = new FastChange();

            InitFastChange(fc);
            //fc.print();

            //Entry e = new Entry("EUR_AUD");
            //e.PrintEntry();

            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Start();
            string ID = GetID();

            //GetQuote(ID, "EUR_AUD", e);
            //Stream(ID);
            TestDelayMultiple(ID);

            System.Threading.Thread th = new System.Threading.Thread(() => Stream(ID));
            th.Start();

            sw.Stop();
            Console.WriteLine(sw.ElapsedMilliseconds);

            /*while(true)
             * {
             *  //System.Threading.Thread.Sleep(10000);
             *  System.Threading.Thread.Sleep(500);
             *  Console.Clear();
             *  PrintValues();
             * }*/

            //e.PrintEntry();
            Console.Read();
        }