Esempio n. 1
0
 public void Add(string key, EventSink item)
 {
     m_Bag.Add(key, item);
 }
Esempio n. 2
0
 public bool ContainsValue(EventSink item)
 {
     return m_Bag.ContainsValue(item);
 }
Esempio n. 3
0
 private void ParseEventSinkParameters(XmlElement element, EventSink eventSink)
 {
     foreach (XmlNode node1 in element.ChildNodes)
     {
       if (node1.NodeType == XmlNodeType.Element)
       {
     XmlElement element1 = (XmlElement) node1;
     if (element1.LocalName != "parameter")
     {
       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.");
     }
     XmlAttribute attribute2 = element1.Attributes["value"];
     if (attribute2 == null)
     {
       throw new InvalidOperationException("value is mandatory,  it cannot be omitted.");
     }
     eventSink.SetValue(attribute1.Value, attribute2.Value);
       }
     }
 }