예제 #1
0
 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();
 }
예제 #2
0
        /// <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();
        }
예제 #3
0
파일: RootFilter.cs 프로젝트: terry2012/DSV
        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();
        }
예제 #4
0
        /// <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();
        }