public RootFilter(XmlReader configuration) { exposed = Convert.ToBoolean(configuration.GetAttribute("expose")); XmlReader subtree = configuration.ReadSubtree(); while (subtree.Read()) { if ((subtree.NodeType == XmlNodeType.Element) && (subtree.Name == "namespace")) { NamespaceFilter namespaceFilter = new NamespaceFilter(subtree); namespaceFilters.Add(namespaceFilter); } } subtree.Close(); }
/// <summary> /// Constructor with configuration read in from an XML reader /// </summary> /// <param name="configuration">The XML reader from which to get the configuration</param> public RootFilter(XmlReader configuration) : this() { exposed = Convert.ToBoolean(configuration.GetAttribute("expose"), CultureInfo.InvariantCulture); XmlReader subtree = configuration.ReadSubtree(); while(subtree.Read()) if(subtree.NodeType == XmlNodeType.Element && subtree.Name == "namespace") { NamespaceFilter namespaceFilter = new NamespaceFilter(subtree); namespaceFilters.Add(namespaceFilter); } subtree.Close(); }
/// <summary> /// Constructor with configuration read in from an XML reader /// </summary> /// <param name="configuration">The XML reader from which to get the configuration</param> public RootFilter(XmlReader configuration) : this() { exposed = Convert.ToBoolean(configuration.GetAttribute("expose"), CultureInfo.InvariantCulture); XmlReader subtree = configuration.ReadSubtree(); while (subtree.Read()) { if (subtree.NodeType == XmlNodeType.Element && subtree.Name == "namespace") { NamespaceFilter namespaceFilter = new NamespaceFilter(subtree); namespaceFilters.Add(namespaceFilter); } } subtree.Close(); }