AzureIoTHubConnectedService.NuGetUtilities.GetPackageRepositoryPath C# (CSharp) Method

GetPackageRepositoryPath() public static method

Get local repository folder path from registory: HKLM\Software\NuGet\Repository
public static GetPackageRepositoryPath ( string repositoryName ) : string
repositoryName string
return string
        public static string GetPackageRepositoryPath(string repositoryName)
        {
            Debug.Assert(!string.IsNullOrEmpty(repositoryName));

            using (RegistryKey key = Registry.LocalMachine.OpenSubKey(NuGetUtilities.RepositoryRegistryKeyPath))
            {
                return key?.GetValue(repositoryName) as string;
            }
        }