コード例 #1
0
ファイル: SettingsKey.cs プロジェクト: h78hy78yhoi8j/xenko
 /// <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="container">The <see cref="SettingsContainer"/> containing this <see cref="SettingsKey"/>.</param>
 /// <param name="defaultValue">The default value associated to this settings key.</param>
 protected SettingsKey(UFile name, SettingsContainer container, object defaultValue)
 {
     Name = name;
     DisplayName = name;
     DefaultObjectValue = defaultValue;
     Container = container;
     Container.RegisterSettingsKey(name, defaultValue, this);
 }
コード例 #2
0
ファイル: SettingsKey.cs プロジェクト: h78hy78yhoi8j/xenko
 /// <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="container">The <see cref="SettingsContainer"/> 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, SettingsContainer container, Func<object> defaultValueCallback)
 {
     Name = name;
     DisplayName = name;
     DefaultObjectValueCallback = defaultValueCallback;
     Container = container;
     Container.RegisterSettingsKey(name, defaultValueCallback(), this);
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SettingsProfile"/> class.
 /// </summary>
 /// <param name="container">The <see cref="SettingsContainer"/> containing this profile.</param>
 /// <param name="parentProfile">The parent profile.</param>
 internal SettingsProfile(SettingsContainer container, SettingsProfile parentProfile)
 {
     Container          = container;
     this.parentProfile = parentProfile;
 }