public static void Initialize() { IntValue = new SettingsValueKey <int>("Test/Simple/IntValue", 10); DoubleValue = new SettingsValueKey <double>("Test/Simple/DoubleValue", 3.14); StringValue = new SettingsValueKey <string>("Test/Simple/StringValue", "Test string"); Console.WriteLine(@"Static settings keys initialized (ValueSettingsKeys)"); }
public static void Initialize() { IntValue = new SettingsValueKey<int>("Test/Simple/IntValue", 10); DoubleValue = new SettingsValueKey<double>("Test/Simple/DoubleValue", 3.14); StringValue = new SettingsValueKey<string>("Test/Simple/StringValue", "Test string"); Console.WriteLine(@"Static settings keys initialized (ValueSettingsKeys)"); }
public static void Initialize() { IntList = new SettingsValueKey <List <int> >("Test/Lists/IntList", TestSettings.SettingsGroup, Enumerable.Empty <int>().ToList()); DoubleList = new SettingsValueKey <List <double> >("Test/Lists/DoubleList", TestSettings.SettingsGroup, new[] { 2.0, 6.0, 9.0 }.ToList()); StringList = new SettingsValueKey <List <string> >("Test/Lists/StringList", TestSettings.SettingsGroup, new[] { "String 1", "String 2", "String 3" }.ToList()); Console.WriteLine(@"Static settings keys initialized (ListSettingsKeys)"); }
public static void Initialize() { IntList = new SettingsValueKey<List<int>>("Test/Lists/IntList", TestSettings.SettingsGroup, Enumerable.Empty<int>().ToList()); DoubleList = new SettingsValueKey<List<double>>("Test/Lists/DoubleList", TestSettings.SettingsGroup, new[] { 2.0, 6.0, 9.0 }.ToList()); StringList = new SettingsValueKey<List<string>>("Test/Lists/StringList", TestSettings.SettingsGroup, new[] { "String 1", "String 2", "String 3" }.ToList()); Console.WriteLine(@"Static settings keys initialized (ListSettingsKeys)"); }
public void SetValue <T>(SettingsValueKey <T> key, T value) { key.SetValue(value, profile); }
public T GetValue <T>(SettingsValueKey <T> key) { return(key.GetValue(true, profile)); }