Esempio n. 1
0
        public XmlConfigBuilder Settings(string elemName, Func <IEnumerable <string> > getValues, Action <List <string> > setValues)
        {
            var setting = new XmlSetting(elemName);

            setting.Initialize(getValues, setValues);
            _rootSetting.Children.Add(setting);
            return(this);
        }
Esempio n. 2
0
        public XmlConfigBuilder Setting <TValue>(string elemName, Expression <Func <TValue> > propSelector)
        {
            var setting = new XmlSetting(elemName);

            setting.Initialize(propSelector);
            _rootSetting.Children.Add(setting);
            return(this);
        }
Esempio n. 3
0
        public XmlConfigBuilder Setting(string elemName, Func <string> getValue, Action <string> setValue)
        {
            var setting = new XmlSetting(elemName);

            setting.Initialize(getValue, setValue);
            _rootSetting.Children.Add(setting);
            return(this);
        }
Esempio n. 4
0
        public XmlConfigBuilder Block(string elemName, Action <IXmlBlockInitializer> initializer)
        {
            var setting = new XmlSetting(elemName);

            _rootSetting.Children.Add(setting);

            var builder = new XmlConfigBuilder(setting);

            initializer(builder);
            return(this);
        }
Esempio n. 5
0
 public XmlConfig(XmlSetting rootSetting)
 {
     _rootSetting = rootSetting;
 }
Esempio n. 6
0
 private XmlConfigBuilder(XmlSetting rootSetting)
 {
     _rootSetting = rootSetting;
 }