Example #1
0
        public XmlConfiguration(string conf)
            : base()
        {
            if (conf == null)
            {
                throw new ArgumentNullException(nameof(conf));
            }

            FileInfo info = new FileInfo(conf);

            this.Root = info.DirectoryName;

            List <string> files = this.GetConfigurationFiles(info);

            if (files == null || files.Count == 0)
            {
                throw new Exception($"Not found configuration files:{conf}");
            }

            XmlCombine combine = new XmlCombine();

            combine.Namespaces.Add(configuration_prefix, configuration_xmlns);

            foreach (string file in files)
            {
                combine.Combine(file);
            }

            using (XmlReader xmlReader = combine.ToXmlReader())
            {
                Configurate(xmlReader);
            }
        }
Example #2
0
 public F4F9AF6F3B04(XmlCombine combine, XmlReader reader)
 {
     this.Namespaces = new XmlNamespaces();
     this.Combine    = combine;
     this.Current    = reader;
 }