Class ReclaimerStrategyCommon
Calculates packages which should be deleted:
- Filter input list - we can reclaim only packages which are in availableToDelete list
- Find all packages according to PackageMask
- Filter according to VersionMask
- Group by minor version
- Inside each group - sort this packages
- If LeaveOnlyLastMinorCount is set - add to result all versions except last count. Property MaxLeaveCount doesn't affect this step
- Inside each left group - add to result all versions except last MaxLeaveCount
- Filter result - there shouldn't be packages which are dependencies for other packages that are not in result
Inheritance
object
ReclaimerStrategyCommon
Implements
Namespace: BuildSystem.Reclaimer.Strategy.Common
Assembly: BuildSystem.Core.dll
Syntax
public class ReclaimerStrategyCommon : Object, IReclaimerStrategy
Constructors
ReclaimerStrategyCommon(ILogger?, IReclaimerStrategyProps, string)
Strategy to make retention of packages:
- Find all packages according to VersionMask
- Sort this packages by version
- Last versions per each package MaxLeaveCount packages will be left
- Filter packages which are not dependencies for other packages
- Filter that IDs in availableToDelete list
Declaration
public ReclaimerStrategyCommon(ILogger? logger, IReclaimerStrategyProps prop, string tempFolder)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | _logger |
IReclaimerStrategyProps | prop | Properties which are the main for classes implementors of IBinder |
string | tempFolder | Unused at this moment temporary folder |
Fields
ClassIdent
Unique ident of class
Declaration
public const string ClassIdent = "ReclaimerStrategy.Common"
Field Value
Type | Description |
---|---|
string |
Methods
GetDeletingPackages(List<IPackageProps>, List<string>)
Calculates packages which should be deleted:
- Filter input list - we can reclaim only packages which are in availableToDelete list
- Find all packages according to PackageMask
- Filter according to VersionMask
- Group by minor version
- Inside each group - sort this packages
- If LeaveOnlyLastMinorCount is set - add to result all versions except last count. Property MaxLeaveCount doesn't affect this step
- Inside each left group - add to result all versions except last MaxLeaveCount
- Filter result - there shouldn't be packages which are dependencies for other packages that are not in result
Declaration
public List<IPackageProps> GetDeletingPackages(List<IPackageProps> packages, List<string> availableToDelete)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<><IPackageProps> | packages | |
System.Collections.Generic.List<><string> | availableToDelete |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<><IPackageProps> |