private void ParseFilter(XmlElement element)
 {
     XmlAttribute attribute1 = element.Attributes["name"];
     if ((attribute1 == null) || (attribute1.Value == string.Empty))
     {
       throw new InvalidOperationException("name is mandatory,  it cannot be omitted or empty.");
     }
     string text1 = attribute1.Value;
     bool flag1 = true;
     XmlAttribute attribute2 = element.Attributes["enabled"];
     if ((attribute2 != null) && (attribute2.Value.ToLower().Trim() == "false"))
     {
       flag1 = false;
     }
     EventFilter filter1 = new EventFilter(text1);
     filter1.Enabled = flag1;
     m_Filters.Add(text1, filter1);
     ParseCategoryRefs(element, filter1);
 }
 public bool ContainsValue(EventFilter item)
 {
     return m_Bag.ContainsValue(item);
 }
 private void ParseCategoryRefs(XmlElement element, EventFilter filter)
 {
     foreach (XmlNode node1 in element.ChildNodes)
     {
       if (node1.NodeType == XmlNodeType.Element)
       {
     XmlElement element1 = (XmlElement) node1;
     if (element1.LocalName != "eventCategoryRef")
     {
       throw new InvalidOperationException(element1.LocalName + " is not allowed in this context.");
     }
     XmlAttribute attribute1 = element1.Attributes["name"];
     if ((attribute1 == null) || (attribute1.Value == string.Empty))
     {
       throw new InvalidOperationException("name is mandatory,  it cannot be omitted or empty.");
     }
     string text1 = attribute1.Value;
     EventCategory category1 = m_EventCategories[text1];
     if (category1 == null)
     {
       throw new InvalidOperationException("The referenced '" + text1 + "' event category does not exist.");
     }
     EventCategorySink sink1 = new EventCategorySink(category1);
     filter.CategoryBindings.Add(text1, sink1);
     ParseEventCategorySink(element1, sink1);
       }
     }
 }
 public void Add(string key, EventFilter item)
 {
     m_Bag.Add(key, item);
 }