Пример #1
0
        /// <summary>
        /// 注册订阅方法
        /// </summary>
        public void RegisterSubscribe <T>(string key, Cache.DoSub dosub)
        {
            ISubscriber isub = connectionMultiplexer.GetSubscriber();

            isub.Subscribe(key, (channel, message) => {
                var cacheObject = Recieve <T>((string)message);
                dosub(cacheObject);
            });
            foreach (var mkey in subs.Keys)
            {
                if (mkey == key)
                {
                    return;
                }
            }
            subs.Add(key, isub);
        }
Пример #2
0
 public void RegisterSubscribe <T>(string key, Cache.DoSub dosub)
 {
     throw new NotImplementedException();
 }
Пример #3
0
 public void RegisterSubscribe <T>(string key, Cache.DoSub dosub)
 {
     return;
 }
Пример #4
0
 public void Recieve <T>(string key, Cache.DoSub dosub)
 {
     throw new NotImplementedException();
 }
Пример #5
0
 public void Recieve <T>(string key, Cache.DoSub dosub)
 {
     return;
 }