/// <summary> /// Initializes a new instance of the <see cref="SettingsKey"/> class. /// </summary> /// <param name="name">The name of this settings key. Must be unique amongst the application.</param> /// <param name="group">The <see cref="SettingsGroup"/> containing this <see cref="SettingsKey"/>.</param> /// <param name="defaultValueCallback">A function that returns the default value associated to this settings key.</param> protected SettingsKey(UFile name, SettingsGroup group, Func<object> defaultValueCallback) { Name = name; DisplayName = name; DefaultObjectValueCallback = defaultValueCallback; Group = group; Group.RegisterSettingsKey(name, defaultValueCallback(), this); }
/// <summary> /// Initializes a new instance of the <see cref="SettingsKey"/> class. /// </summary> /// <param name="name">The name of this settings key. Must be unique amongst the application.</param> /// <param name="group">The <see cref="SettingsGroup"/> containing this <see cref="SettingsKey"/>.</param> /// <param name="defaultValue">The default value associated to this settings key.</param> protected SettingsKey(UFile name, SettingsGroup group, object defaultValue) { Name = name; DisplayName = name; DefaultObjectValue = defaultValue; Group = group; Group.RegisterSettingsKey(name, defaultValue, this); }
/// <summary> /// Initializes a new instance of the <see cref="SettingsValueKey{T}"/> class. /// </summary> /// <param name="name">The name of this settings key. Must be unique amongst the application.</param> /// <param name="group">The <see cref="SettingsGroup"/> containing this <see cref="SettingsKey"/>.</param> /// <param name="defaultValueCallback">A function that returns the default value associated to this settings key.</param> public SettingsValueKey(UFile name, SettingsGroup group, Func <object> defaultValueCallback) : base(name, group, defaultValueCallback) { }
/// <summary> /// Initializes a new instance of the <see cref="SettingsValueKey{T}"/> class. /// </summary> /// <param name="name">The name of the settings key. Must be unique amongst an application.</param> /// <param name="group">The <see cref="SettingsGroup"/> containing this <see cref="SettingsKey"/>.</param> /// <param name="defaultValue">The default value for this settings key.</param> public SettingsValueKey(UFile name, SettingsGroup group, T defaultValue) : base(name, group, defaultValue) { }
public SettingsCollection(SettingsGroup settingsGroup) { profile = settingsGroup.CreateSettingsProfile(false); }
/// <summary> /// Initializes a new instance of the <see cref="SettingsProfile"/> class. /// </summary> /// <param name="group">The <see cref="SettingsGroup"/> containing this profile.</param> /// <param name="parentProfile">The parent profile.</param> internal SettingsProfile(SettingsGroup group, SettingsProfile parentProfile) { Group = group; this.parentProfile = parentProfile; }
/// <summary> /// Initializes a new instance of the <see cref="SettingsValueKey{T}"/> class. /// </summary> /// <param name="name">The name of the settings key. Must be unique amongst an application.</param> /// <param name="group">The <see cref="SettingsGroup"/> containing this <see cref="SettingsKey"/>.</param> public SettingsValueKey(UFile name, SettingsGroup group) : this(name, group, default(T)) { }