Exemple #1
0
    public void RemoveExclude(EB.Sparx.Manager manager, string message)
    {
        if (m_excludes.ContainsKey(manager))
        {
            message = message.ToLower();
            List <string> excludes = m_excludes[manager];
            excludes.Remove(message);

            if (excludes.Count == 0)
            {
                m_excludes.Remove(manager);
            }
        }
    }
Exemple #2
0
    private bool ShouldExclude(EB.Sparx.Manager manager, string message)
    {
        if (manager == null)
        {
            return(false);
        }

        if (!m_excludes.ContainsKey(manager))
        {
            return(false);
        }

        message = message.ToLower();
        List <string> excludes = m_excludes[manager];

        return(excludes.Contains(message));
    }
Exemple #3
0
 public void AddExclude(EB.Sparx.Manager manager, string message)
 {
     message = message.ToLower();
     if (m_excludes.ContainsKey(manager))
     {
         List <string> excludes = m_excludes[manager];
         if (!excludes.Contains(message))
         {
             excludes.Add(message);
         }
     }
     else
     {
         m_excludes[manager] = new List <string>()
         {
             message
         };
     }
 }