/// <summary>
 /// Returns the settings loaded from the user- and machine-wide config files
 /// </summary>
 /// <param name="configDirectory">Optional. Specifies an additional directory in which to look for a NuGet.config file</param>
 public static ISettings GetSettingsFromConfigFiles(string configDirectory)
 {
     IFileSystem fileSystem = null;
     if (configDirectory != null)
     {
         fileSystem = new PhysicalFileSystem(configDirectory);
     }
     NuGetMachineWideSettings machineSettings = new NuGetMachineWideSettings();
     ISettings settings = Settings.LoadDefaultSettings(fileSystem, null, machineSettings);
     return settings;
 }
        /// <summary>
        /// Returns the settings loaded from the user- and machine-wide config files
        /// </summary>
        /// <param name="configDirectory">Optional. Specifies an additional directory in which to look for a NuGet.config file</param>
        public static ISettings GetSettingsFromConfigFiles(string configDirectory)
        {
            IFileSystem fileSystem = null;

            if (configDirectory != null)
            {
                fileSystem = new PhysicalFileSystem(configDirectory);
            }
            NuGetMachineWideSettings machineSettings = new NuGetMachineWideSettings();
            ISettings settings = Settings.LoadDefaultSettings(fileSystem, null, machineSettings);

            return(settings);
        }