public void Add(string key, EventSink item) { m_Bag.Add(key, item); }
public bool ContainsValue(EventSink item) { return m_Bag.ContainsValue(item); }
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); } } }