SonarQube.Plugins.Roslyn.NuGetPackageHandler.GetLocalPackageRootDirectory C# (CSharp) Method

GetLocalPackageRootDirectory() public method

public GetLocalPackageRootDirectory ( IPackage package ) : string
package IPackage
return string
        public string GetLocalPackageRootDirectory(IPackage package)
        {
            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            Debug.Assert(this.packageManager.FileSystem != null);
            Debug.Assert(this.packageManager.PathResolver != null);
            string packageDirectory = this.packageManager.FileSystem.GetFullPath(this.packageManager.PathResolver.GetPackageDirectory(package));

            Debug.Assert(Directory.Exists(packageDirectory), "Expecting the package directory to exist: {0}", packageDirectory);
            return packageDirectory;
        }