Class ReclaimerStrategyCommonProps
Strategy to make retention of packages:
- Collect all packages according to VersionMask
- Sort packages by version
- Delete all packages except last MaxLeaveCount packages per each minor version
- Delete all packages except last LeaveOnlyLastMinorCount minor versions
Inheritance
Implements
Namespace: BuildSystem.Reclaimer.Strategy.Common
Assembly: BuildSystem.Core.dll
Syntax
public class ReclaimerStrategyCommonProps : Object, IReclaimerStrategyProps
Constructors
ReclaimerStrategyCommonProps()
Strategy to make retention of packages:
- Collect all packages according to VersionMask
- Sort packages by version
- Delete all packages except last MaxLeaveCount packages per each minor version
- Delete all packages except last LeaveOnlyLastMinorCount minor versions
Declaration
public ReclaimerStrategyCommonProps()
Fields
NodeLeaveOnlyLastMinorCount
Node key in JSON with value for LeaveOnlyLastMinorCount
Declaration
public const string NodeLeaveOnlyLastMinorCount = "leave_only_last_minor_count"
Field Value
Type | Description |
---|---|
string |
NodeMask
Node key in JSON with value for VersionMask
Declaration
public const string NodeMask = "version_mask"
Field Value
Type | Description |
---|---|
string |
NodeMaxLeaveCount
Node key in JSON with value for MaxLeaveCount
Declaration
public const string NodeMaxLeaveCount = "max_leave_count"
Field Value
Type | Description |
---|---|
string |
NodeName
Node key in JSON with value for Name
Declaration
public const string NodeName = "name"
Field Value
Type | Description |
---|---|
string |
NodePackageManager
Node key with value for PackageManagerProps
Declaration
public const string NodePackageManager = "package_manager"
Field Value
Type | Description |
---|---|
string |
NodePackageMask
Node key in JSON with value for PackageMask
Declaration
public const string NodePackageMask = "package_mask"
Field Value
Type | Description |
---|---|
string |
Properties
LeaveOnlyLastMinorCount
If value is not null, then only packages of last minor versions will be left
Declaration
public Nullable<int> LeaveOnlyLastMinorCount { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<><int> |
MaxLeaveCount
Count of packages which should be left and not deleted
Declaration
public Nullable<int> MaxLeaveCount { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<><int> |
Name
Unique identifier for strategy
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
PackageManagerProps
Properties for contacting with package storage
Declaration
public IPackageManagerProps? PackageManagerProps { get; set; }
Property Value
Type | Description |
---|---|
IPackageManagerProps |
PackageMask
Mask for ID of analyzing packages
Declaration
public string? PackageMask { get; set; }
Property Value
Type | Description |
---|---|
string |
VersionMask
Mask of versions of analyzing packages
Declaration
public VersionProp? VersionMask { get; set; }
Property Value
Type | Description |
---|---|
VersionProp |
Methods
ApplyConstants(IDictionaryStringString)
Replace some values in properties with constants
Declaration
public void ApplyConstants(IDictionaryStringString constants)
Parameters
Type | Name | Description |
---|---|---|
IDictionaryStringString | constants |
Clone()
Create new instance as copy of existing
Declaration
public IReclaimerStrategyProps Clone()
Returns
Type | Description |
---|---|
IReclaimerStrategyProps |
Copy(IReclaimerStrategyProps)
Copy all properties from another instance
Declaration
public void Copy(IReclaimerStrategyProps props)
Parameters
Type | Name | Description |
---|---|---|
IReclaimerStrategyProps | props |
EmptyValues()
Set values of private properties to default
Declaration
public void EmptyValues()
Update(JsonNode?, string)
Update self properties from json
Declaration
public void Update(JsonNode? jsonInfo, string relativeDir)
Parameters
Type | Name | Description |
---|---|---|
System.Text.Json.Nodes.JsonNode | jsonInfo | Reading json |
string | relativeDir | Path to be added if value is relative path |