BuildMaintenanceApplication.CleanAsync
Section titled “BuildMaintenanceApplication.CleanAsync”
- Uses the same owner inventory, dependency protection and retirement plan for automatic and explicit cleanup.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Build.Toolchains
Declaration
Section titled “Declaration”public static System.Threading.Tasks.Task Inno.Build.Toolchains.BuildMaintenanceApplication.CleanAsync(string engineRoot, Inno.Build.Toolchains.BuildCachePolicy policy, bool retireAll, bool dryRun, string? targetId, System.Threading.CancellationToken cancellationToken)Parameters
Section titled “Parameters”Parameter engineRoot: The absolute checkout containing registered publishers.
Parameter policy: The bounded size and duration policy.
Parameter retireAll: Whether to select every unreferenced generation instead of pressure candidates.
Parameter dryRun: Whether to report the plan without retiring it.
Parameter targetId: An optional exact producer target filter; shared dependencies remain protected.
Parameter cancellationToken: Cancels inventory and retirement.
Returns
Section titled “Returns”A completed, bounded cleanup operation with protected owners retained.
Exceptions
Section titled “Exceptions”Exception T:System.InvalidOperationException: Explicit retirement encountered failures.
Exception T:System.TimeoutException: Owner discovery or planning exhausts the operation budget before retirement can begin.
Exception T:System.IO.IOException: Ownership metadata or protected input cannot be validated.
Exception T:System.OperationCanceledException: The caller canceled before completion.