public PluginParentItem(XPathNavigator pluginRootnode)
            : this()
        {
            if (pluginRootnode == null)
            {
                throw new ArgumentNullException("pluginRootnode");
            }

            _realName     = XmlHelper.GetXmlStringValue(pluginRootnode, "parent");
            _matchingName = PluginSearch.GetFirstMatchingNamespaceName(_realName);
            _merge        = XmlHelper.GetXmlBoolValue(pluginRootnode, "merge", true);

            string childName = XmlHelper.GetXmlStringValue(pluginRootnode, "child");

            if (!String.IsNullOrEmpty(childName))
            {
                _children.Add(new PluginChildItem(childName));
            }
            else
            {
                XPathNodeIterator pChild = pluginRootnode.SelectChildren("child",
                                                                         String.Empty);

                while (pChild.MoveNext())
                {
                    _children.Add(new PluginChildItem(pChild.Current));
                }
            }
        }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="childName"></param>
 public PluginChildItem(string childName)
 {
     if (String.IsNullOrEmpty(childName))
     {
         throw new ArgumentNullException("childName");
     }
     _realName     = childName;
     _matchingName = PluginSearch.GetFirstMatchingNamespaceName(_realName);
 }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pluginRootnode"></param>
        public PluginChildItem(XPathNavigator pluginRootnode)
        {
            if (pluginRootnode == null)
            {
                throw new ArgumentNullException("pluginRootnode");
            }

            _realName     = XmlHelper.GetXmlStringValue(pluginRootnode, "name");
            _matchingName = PluginSearch.GetFirstMatchingNamespaceName(_realName);
        }