namespace UnityEditor.SettingsManagement { /// /// A settings repository is responsible for implementing the saving and loading of values. /// public interface ISettingsRepository { /// /// What SettingsScope this repository applies to. /// SettingsScope scope { get; } /// /// A name to identify this repository. /// string name { get; } /// /// File path to the serialized settings data. /// string path { get; } /// /// Save all settings to their serialized state. /// void Save(); /// /// Set a value for key of type T. /// /// The settings key. /// The value to set. Must be serializable. /// Type of value. void Set(string key, T value); /// /// Get a value with key of type T, or return the fallback value if no matching key is found. /// /// The settings key. /// If no key with a value of type T is found, this value is returned. /// Type of value to search for. T Get(string key, T fallback = default(T)); /// /// Does the repository contain a setting with key and type. /// /// The settings key. /// The type of value to search for. /// True if a setting matching both key and type is found, false if no entry is found. bool ContainsKey(string key); /// /// Remove a key value pair from the settings repository. /// /// /// void Remove(string key); } }