public void Setup() { _settings = new ExampleSettings(); //Normally the builder does all this stuff //but we want to have a direct reference to the dictionary _settingsDictionary = new SettingsDictionary() { ["ExampleSettings.MyIntProperty"] = "400", ["ExampleSettings.RequiredInt"] = "200", ["ExampleSettings.MyReadonlyIntProperty"] = "600", ["ExampleSettings.MyTimeSpan"] = "00:20:00", ["MyTimeSpan"] = "00:42:00", ["Key"] = "Key", ["Key:PROD"] = "PROD", ["Key:TEST"] = "TEST", ["Key:PROD2"] = "PROD", ["ServerIp"] = "127.0.0.1", ["ServerEndPoint"] = "127.0.0.1:80", ["env"] = "staging", ["ExampleSettings.MyTimeSpan:staging"] = "00:15:00", ["ExampleSettings.MyTimeSpan:FAIL"] = "not a timespan" }; _settings.SettingsDictionary = new CompositeSettingsDictionary(); _settings.SettingsDictionary.Add(_settingsDictionary); _settings.PreLoad(); }
public void Setup() { _settings = new ExampleSettings(); //Normally the builder does all this stuff //but we want to have a direct reference to the dictionary _settingsDictionary = new SettingsDictionary() { ["ExampleSettings.MyIntProperty"] = "400", ["ExampleSettings.RequiredInt"] = "200", ["ExampleSettings.MyReadonlyIntProperty"] = "600", ["ExampleSettings.MyTimeSpan"] = "00:20:00", ["MyTimeSpan"] = "00:42:00", ["Key"] = "Key", ["Key:PROD"] = "PROD", ["Key:TEST"] = "TEST", ["Key:PROD2"] = "PROD", ["Config"] = "PROD" }; _settings.SettingsDictionary = new CompositeSettingsDictionary(); _settings.SettingsDictionary.Add(_settingsDictionary); _settings.PreLoad(); }