Class PackageManagerNuget
NuGet package manager for .nuspec files
Inheritance
Namespace: BuildSystem.PackageManager.Nuget
Assembly: BuildSystem.Core.dll
Syntax
public class PackageManagerNuget : Object, IPackageManager, IManager
Constructors
PackageManagerNuget(ILogger?, PackageManagerNugetProps, string)
NuGet package manager for .nuspec files
Declaration
public PackageManagerNuget(ILogger? logger, PackageManagerNugetProps props, string tempDir)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | Logging object |
PackageManagerNugetProps | props | Properties of package manager |
string | tempDir | Parent folder for own temporary folders |
Fields
ClassIdent
Unique ident of class
Declaration
public const string ClassIdent = "PackageManager.Nuget"
Field Value
Type | Description |
---|---|
string |
Properties
Logger
Declaration
public ILogger? Logger { get; }
Property Value
Type | Description |
---|---|
ILogger |
Props
Declaration
public IManagerProp Props { get; }
Property Value
Type | Description |
---|---|
IManagerProp |
Methods
Delete(IPackageProps)
Delete package with specialized version from server
Declaration
public virtual bool Delete(IPackageProps packageProps)
Parameters
Type | Name | Description |
---|---|---|
IPackageProps | packageProps | Params of deleting package |
Returns
Type | Description |
---|---|
bool | Flag that everything is ok |
GetPackageInfo(string, VersionProp, bool)
Get information from package repository about exact version
Declaration
public IPackageProps? GetPackageInfo(string packageId, VersionProp packageVersion, bool useCache)
Parameters
Type | Name | Description |
---|---|---|
string | packageId | Id of package |
VersionProp | packageVersion | Version of package |
bool | useCache | Use local cache on computer |
Returns
Type | Description |
---|---|
IPackageProps | Full info about requested package |
GetPackageList(string, bool)
Get all packages from package repository
Declaration
public List<IPackageProps> GetPackageList(string mask, bool useCache = true)
Parameters
Type | Name | Description |
---|---|---|
string | mask | Mask to filter searching packages. Use "." if you want to get everything |
bool | useCache | Use cache or not. Disabling cache produces exponential slowing down |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<><IPackageProps> | List of packages. Per each package only id and version will be filled |
GetVersionList(string, bool)
Get list of versions from package repository
Declaration
public List<VersionProp> GetVersionList(string packageId, bool useCache)
Parameters
Type | Name | Description |
---|---|---|
string | packageId | Id of searching package |
bool | useCache | Use local cache on computer |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<><VersionProp> | List of version info for requested package |
Pack(IPackage, bool)
Create .nupkg file, which can be pushed to server
Declaration
public bool Pack(IPackage package, bool forceUpdateVersion)
Parameters
Type | Name | Description |
---|---|---|
IPackage | package | Parameters of pushing package |
bool | forceUpdateVersion | Update version even there is no changes |
Returns
Type | Description |
---|---|
bool | Path to .nupkg archive |
Push(IPackage)
Push file to server
Declaration
public void Push(IPackage package)
Parameters
Type | Name | Description |
---|---|---|
IPackage | package | Params of pushing package |