Interface INuGetManager
Namespace: LemonEdge.NuGetManager
Assembly: LemonEdge.NuGetManager.dll
Syntax
public interface INuGetManager
Methods
ClearLocalCache()
Clears the local NuGet cache
Declaration
void ClearLocalCache()
CreateNuGetPackage(string, string, bool)
Creates an instance of NuGetPackage
Declaration
NuGetPackage CreateNuGetPackage(string name, string version, bool isPreRelease = false)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the package |
string | version | The version string (i.e. , 1.2., 2.*, etc.) |
bool | isPreRelease | If pre-release packages should be considered |
Returns
Type | Description |
---|---|
NuGetPackage |
DownloadAndInstallNuGetPackageAsync(NuGetPackage, CancellationToken)
Downloads a given package name and its dependencies.
Declaration
Task<Dictionary<string, string>> DownloadAndInstallNuGetPackageAsync(NuGetPackage nuGetPackage, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
NuGetPackage | nuGetPackage | A nuGet package to download NuGetPackage |
CancellationToken | token | The cancellation token |
Returns
Type | Description |
---|---|
Task<Dictionary<string, string>> | A collection of file-paths to each installed NuGet package |
DownloadAndInstallNuGetPackagesAsync(IEnumerable<NuGetPackage>, CancellationToken)
Downloads a collection of packages and their dependencies.
Declaration
Task<Dictionary<string, string>> DownloadAndInstallNuGetPackagesAsync(IEnumerable<NuGetPackage> nuGetPackages, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<NuGetPackage> | nuGetPackages | A collection of nuGet packages to download NuGetPackage |
CancellationToken | token | The cancellation token |
Returns
Type | Description |
---|---|
Task<Dictionary<string, string>> | A collection of nuget package names and file-paths for each installed NuGet package |