Пример #1
0
        public void ToStringTest()
        {
            ChannelMessage target   = CreateChannelMessage(); // TODO: Initialize to an appropriate value
            string         expected = string.Empty;           // TODO: Initialize to an appropriate value
            string         actual;

            actual = target.ToString();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Пример #2
0
        static void Main(string[] args)
        {
            try
            {
                int       dbNumber = 2;
                IDatabase redis    = RedisHelper.GetRedis().GetDatabase(dbNumber);
                //redis.StringSet("coretest", "testsuccess");


                ISubscriber subscriber = RedisHelper.GetRedis().GetSubscriber();
                subscriber.Subscribe("testchannel", (RedisChannel, ChannelMessage) =>
                {
                    Console.WriteLine(ChannelMessage.ToString());
                });

                Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                throw;
            }
        }