Beispiel #1
0
        static void Main(string[] args)
        {
            RedisAdaptor = new RedisAdaptor(ConfigManager.CacheConn());
            MysqlAdaptor = new MysqlAdaptor(ConfigManager.DbIP(), ConfigManager.DbName(), ConfigManager.DbUser(), ConfigManager.DbPass());

            CacheDataService       = new RedisDataServiceDelegate(RedisAdaptor);
            PersistenceDataService = new MysqlDataServiceDelegate(MysqlAdaptor);

            while (true)
            {
                Console.WriteLine("begin check...");
                Console.WriteLine(ThreadInfo());

                Work().Wait();

                Thread.Sleep(TimeSpan.FromSeconds(30));
            }
        }
        static void Main(string[] args)
        {
            RedisAdaptor = new RedisAdaptor(ConfigManager.CacheConn());
            MysqlAdaptor = new MysqlAdaptor(ConfigManager.DbIP(), ConfigManager.DbName(), ConfigManager.DbUser(), ConfigManager.DbPass());
            
            CacheDataService = new RedisDataServiceDelegate(RedisAdaptor);
            PersistenceDataService = new MysqlDataServiceDelegate(MysqlAdaptor);

            while (true)
            {
                Console.WriteLine("begin check...");
                Console.WriteLine(ThreadInfo());

                Work().Wait();

                Thread.Sleep(TimeSpan.FromSeconds(30));
            }
        }