using System.Diagnostics; using System.Globalization; namespace LibGit2Sharp { /// /// The full representation of a config option. /// /// The configuration value type [DebuggerDisplay("{DebuggerDisplay,nq}")] public class ConfigurationEntry { /// /// The fully-qualified option name. /// public virtual string Key { get; private set; } /// /// The option value. /// public virtual T Value { get; private set; } /// /// The origin store. /// public virtual ConfigurationLevel Level { get; private set; } /// /// Needed for mocking purposes. /// protected ConfigurationEntry() { } /// /// Initializes a new instance of the class with a given key and value /// /// The option name /// The option value /// The origin store internal ConfigurationEntry(string key, T value, ConfigurationLevel level) { Key = key; Value = value; Level = level; } private string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "{0} = \"{1}\"", Key, Value); } } } }