diff options
author | Keith Dahlby <dahlbyk@gmail.com> | 2013-01-31 02:30:46 +0400 |
---|---|---|
committer | yorah <yoram.harmelin@gmail.com> | 2013-04-03 13:59:24 +0400 |
commit | 30fba1fedd1d474ea2ea6fa78cb81240c2a9ca11 (patch) | |
tree | 8dbd88e5e1cc58f6ccaaa73bc115020dfea2ecb8 /LibGit2Sharp/Configuration.cs | |
parent | 486f941bee3ef50959be93bcef8f764dc9fcf17c (diff) |
Remove obsolete Configuration members/extensions
Diffstat (limited to 'LibGit2Sharp/Configuration.cs')
-rw-r--r-- | LibGit2Sharp/Configuration.cs | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/LibGit2Sharp/Configuration.cs b/LibGit2Sharp/Configuration.cs index 04747d79..eb273390 100644 --- a/LibGit2Sharp/Configuration.cs +++ b/LibGit2Sharp/Configuration.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Globalization; using System.IO; -using System.Linq; using System.Runtime.InteropServices; using LibGit2Sharp.Core; using LibGit2Sharp.Core.Handles; @@ -13,7 +12,6 @@ namespace LibGit2Sharp /// Provides access to configuration variables for a repository. /// </summary> public class Configuration : IDisposable, - IEnumerable<ConfigurationEntry>, IEnumerable<ConfigurationEntry<string>> { private readonly FilePath globalConfigPath; @@ -86,24 +84,6 @@ namespace LibGit2Sharp } /// <summary> - /// Determines if a Git configuration file specific to the current interactive user has been found. - /// </summary> - [Obsolete("This property will be removed in the next release. Please use HasConfig() instead.")] - public virtual bool HasGlobalConfig - { - get { return HasConfig(ConfigurationLevel.Global); } - } - - /// <summary> - /// Determines if a system-wide Git configuration file has been found. - /// </summary> - [Obsolete("This property will be removed in the next release. Please use HasConfig() instead.")] - public virtual bool HasSystemConfig - { - get { return HasConfig(ConfigurationLevel.System); } - } - - /// <summary> /// Determines which configuration file has been found. /// </summary> public virtual bool HasConfig(ConfigurationLevel level) @@ -288,12 +268,6 @@ namespace LibGit2Sharp IEnumerator<ConfigurationEntry<string>> IEnumerable<ConfigurationEntry<String>>.GetEnumerator() { - return BuildConfigEntries().Cast<ConfigurationEntry<string>>().GetEnumerator(); - } - - [Obsolete("This method will be removed in the next release. Please use a different overload instead.")] - IEnumerator<ConfigurationEntry> IEnumerable<ConfigurationEntry>.GetEnumerator() - { return BuildConfigEntries().GetEnumerator(); } @@ -302,15 +276,15 @@ namespace LibGit2Sharp return ((IEnumerable<ConfigurationEntry<string>>)this).GetEnumerator(); } - private ICollection<ConfigurationEntry> BuildConfigEntries() + private IEnumerable<ConfigurationEntry<string>> BuildConfigEntries() { return Proxy.git_config_foreach(configHandle, entryPtr => { var entry = (GitConfigEntry)Marshal.PtrToStructure(entryPtr, typeof(GitConfigEntry)); - return new ConfigurationEntry(Utf8Marshaler.FromNative(entry.namePtr), - Utf8Marshaler.FromNative(entry.valuePtr), - (ConfigurationLevel)entry.level); + return new ConfigurationEntry<string>(Utf8Marshaler.FromNative(entry.namePtr), + Utf8Marshaler.FromNative(entry.valuePtr), + (ConfigurationLevel)entry.level); }); } } |