BuildArtifactReadLease.AcquireAsync
Section titled “BuildArtifactReadLease.AcquireAsync”
- Acquires reading ownership and verifies the complete artifact before exposing it to a consumer.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Build.Toolchains
Declaration
Section titled “Declaration”public static System.Threading.Tasks.ValueTask<Inno.Build.Toolchains.BuildArtifactReadLease> Inno.Build.Toolchains.BuildArtifactReadLease.AcquireAsync(string directory, string ownerDirectory, string fingerprint, System.Collections.Generic.IReadOnlyList<string> outputDirectories, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), Inno.Build.Toolchains.NativeBuildContext? statistics = null)Parameters
Section titled “Parameters”Parameter ownerDirectory: The exact publisher root retaining the persistent owner.lock gate.
Parameter directory: The absolute artifact directory owned by its publisher; its persistent lease is stored alongside it.
Parameter fingerprint: The exact input identity required by the consumer.
Parameter outputDirectories: The complete relative output roots declared by the publisher.
Parameter cancellationToken: Cancels ownership acquisition without releasing another reader’s protection.
Parameter statistics: Optional borrowed operation receiving output-integrity read statistics; its input cache is not used.
Returns
Section titled “Returns”Reading ownership which the caller must retain until all artifact access completes.
Exceptions
Section titled “Exceptions”Exception T:System.ArgumentException: The directory is not absolute or a required identity is blank.
Exception T:System.IO.InvalidDataException: The complete artifact does not match the requested identity and output inventory.
Exception T:System.TimeoutException: Repair or retirement retains exclusive ownership for more than thirty seconds.
Exception T:System.OperationCanceledException: Waiting was canceled before ownership could be returned.