Class FallbackPackagePathResolver
public class FallbackPackagePathResolver
- Inheritance
-
FallbackPackagePathResolver
- Inherited Members
Constructors
FallbackPackagePathResolver(INuGetPathContext)
Creates a package folder path resolver that scans multiple folders to find a package.
public FallbackPackagePathResolver(INuGetPathContext pathContext)
Parameters
pathContext
INuGetPathContextNuGet paths loaded from NuGet.Config settings.
FallbackPackagePathResolver(string, IEnumerable<string>)
public FallbackPackagePathResolver(string userPackageFolder, IEnumerable<string> fallbackPackageFolders)
Parameters
userPackageFolder
stringfallbackPackageFolders
IEnumerable<string>
Methods
GetPackageDirectory(string, NuGetVersion)
Returns the root directory of an installed package.
public string GetPackageDirectory(string packageId, NuGetVersion version)
Parameters
packageId
stringPackage id.
version
NuGetVersionPackage version.
Returns
- string
Returns the path if the package exists in any of the folders. Null if the package does not exist.
GetPackageDirectory(string, string)
Returns the root directory of an installed package.
public string GetPackageDirectory(string packageId, string version)
Parameters
Returns
- string
Returns the path if the package exists in any of the folders. Null if the package does not exist.
GetPackageInfo(string, NuGetVersion)
Returns the package info along with a path resolver specific to the folder where the package exists.
public FallbackPackagePathInfo GetPackageInfo(string packageId, NuGetVersion version)
Parameters
packageId
stringPackage id.
version
NuGetVersionPackage version.
Returns
- FallbackPackagePathInfo
Returns the package info if the package exists in any of the folders. Null if the package does not exist.