Ejemplo n.º 1
0
        public bool Load(string uri, out IConfigPropertySourceAdapter <string, string> configPropertySourceAdapter, out IConfigNavigationSourceAdapter <string, ConfigElement> configNavigationSourceAdapter)
        {
            XElement element = XElement.Load(uri);

            configPropertySourceAdapter   = new XMLPropertyConfigSource(element);
            configNavigationSourceAdapter = new XMLElementConfigSource(element);

            foreach (var coll in element.Elements().Where(e => e.Attributes().Any(a => a.Name == "CollectionOf")))
            {
                var e = configNavigationSourceAdapter.Get(coll.Name.ToString());
                BuildCache(e);
            }
            return(false);
        }
Ejemplo n.º 2
0
        public bool Load(string uri)
        {
            cachedElements = new Dictionary <string, ConfigElement>();
            IConfigPropertySourceAdapter <string, string>          propertySourceAdapter = null;
            IConfigNavigationSourceAdapter <string, ConfigElement> elementSourceAdapter  = null;

            ConfigSourceFactory.Load(uri, out propertySourceAdapter, out elementSourceAdapter);

            this.propertiesSource = propertySourceAdapter;
            Elements = new ConfigElements(elementSourceAdapter);

            //Walk structure and build cache



            return(false);
        }
Ejemplo n.º 3
0
 public ConfigElement(IConfigPropertySourceAdapter <string, string> propertySourceAdapter, IConfigNavigationSourceAdapter <string, ConfigElement> elementSourceAdapter)
 {
     this.propertiesSource = propertySourceAdapter;
     Elements = new ConfigElements(elementSourceAdapter);
 }
Ejemplo n.º 4
0
 public ConfigElement Append(IConfigPropertySourceAdapter <string, ConfigElement> element)
 {
     throw new NotImplementedException();
 }