Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #5
0
 public XmlConfig(XmlSetting rootSetting)
 {
     _rootSetting = rootSetting;
 }
Beispiel #6
0
 private XmlConfigBuilder(XmlSetting rootSetting)
 {
     _rootSetting = rootSetting;
 }