Table of Contents

Class FallbackPackagePathResolver

Namespace
NuGet.Packaging
Assembly
Chocolatey.NuGet.Packaging.dll
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 INuGetPathContext

NuGet paths loaded from NuGet.Config settings.

FallbackPackagePathResolver(string, IEnumerable<string>)

public FallbackPackagePathResolver(string userPackageFolder, IEnumerable<string> fallbackPackageFolders)

Parameters

userPackageFolder string
fallbackPackageFolders IEnumerable<string>

Methods

GetPackageDirectory(string, NuGetVersion)

Returns the root directory of an installed package.

public string GetPackageDirectory(string packageId, NuGetVersion version)

Parameters

packageId string

Package id.

version NuGetVersion

Package 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

packageId string

Package id.

version string

Package version.

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 string

Package id.

version NuGetVersion

Package version.

Returns

FallbackPackagePathInfo

Returns the package info if the package exists in any of the folders. Null if the package does not exist.