コード例 #1
0
 internal void Delete(object key)
 {
     if (IsExist(key))
     {
         OnlineStatic os = ((OnlineStatic)paramCache[key]);
         ManagerInfoBLL.UpdateState(new ManagerInfo {
             AdminID = os.Id, AdminMasterRight = masterRight.离线
         });
         paramCache.Remove(key);
     }
 }
コード例 #2
0
 public static void Create(string key, OnlineStatic value)
 {
     if (IsExist(key))
     {
         CacheManager.Instance.Update(key, value);
     }
     else
     {
         CacheManager.Instance.Create(key, value);
     }
 }
コード例 #3
0
        internal static void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            ArrayList akeys = new ArrayList(paramCache.Keys);

            for (int i = 0; i < akeys.Count; i++)
            {
                if (((OnlineStatic)paramCache[akeys[i]]).IsLeave)
                {
                    OnlineStatic os = ((OnlineStatic)paramCache[akeys[i]]);
                    ManagerInfoBLL.UpdateState(new ManagerInfo {
                        AdminID = os.Id, AdminMasterRight = masterRight.离线
                    });
                    paramCache.Remove(akeys[i]);
                }
            }
        }
コード例 #4
0
 public static void Update(string key, OnlineStatic value)
 {
     CacheManager.Instance.Update(key, value);
 }