示例#1
0
 /// <summary>
 /// Get all the mutes from the database
 /// </summary>
 /// <param name="AgentID"></param>
 /// <param name="Cached"></param>
 /// <returns></returns>
 public MuteList[] GetMutes(UUID AgentID, out bool Cached)
 {
     Cached = false;
     MuteList[] List = new MuteList[0];
     if (MuteListConnector == null)
     {
         return(List);
     }
     if (!MuteListCache.TryGetValue(AgentID, out List))
     {
         List = MuteListConnector.GetMuteList(AgentID);
     }
     else
     {
         Cached = true;
     }
     return(List);
 }
示例#2
0
        /// <summary>
        ///     Get all the mutes from the database
        /// </summary>
        /// <param name="agentID"></param>
        /// <param name="cached"></param>
        /// <returns></returns>
        public MuteList [] GetMutes(UUID agentID, out bool cached)
        {
            cached = false;
            MuteList [] muteList = new MuteList [0];
            if (MuteListConnector == null)
            {
                return(muteList);
            }
            lock (MuteListCache) {
                if (!MuteListCache.TryGetValue(agentID, out muteList))
                {
                    muteList = MuteListConnector.GetMuteList(agentID).ToArray();
                    MuteListCache.Add(agentID, muteList);
                }
                else
                {
                    cached = true;
                }
            }

            return(muteList);
        }