API Reference
ArchiveInspection
An immutable passive inventory with serialized, bounded member reads. Dispose releases its input and decoder indexes.
Inheritance
- Object
- ArchiveInspection
Usage
Explore 1 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 1
- Method ArchiveInspector.Open
Methods
public Void Dispose() #VoidReleases the input snapshot and indexes. Already returned member streams and immutable inventory metadata remain usable.
public Stream OpenRead(Int32 ordinal, CancellationToken cancellationToken = default) #StreamReturns a read-only stream containing one complete length-validated member. Every nonzero CAB frame checksum in its containing folder is checked; absent checksums do not establish authenticity. The source ordinal selects duplicate names independently. The entire containing CAB folder is decoded and charged before returning; no prefix or partial bytes escape. The returned stream is caller-owned and remains valid after this inspection is disposed.
Parameters
- ordinal System.Int32
- cancellationToken System.Threading.CancellationToken = default
Exceptions
NotSupportedException– The entry's declared source or compression cannot be read.OfficeInspectionResourceLimitException– A configured or fixed managed admission ceiling is exhausted.InvalidDataException– Decoded content is corrupt.
public Stream OpenStorageStream(Int32 ordinal, CancellationToken cancellationToken = default) #StreamReturns all bytes of one inert raw MSI stream, without interpreting or executing its content. Per-member and cumulative read limits apply, and the returned caller-owned stream survives inspection disposal.
Parameters
- ordinal System.Int32
- cancellationToken System.Threading.CancellationToken = default
public ArchiveReadBatch ReadMembers(IReadOnlyList<Int32> ordinals, Int64 maxSelectedBytes, CancellationToken cancellationToken = default) #ArchiveReadBatchReads selected complete members in request order, decoding each selected cabinet folder once. Raw duplicate names and MSI aliases remain separate. Selected payload size, ordinals and source support are checked before decoding. A corruption, limit or cancellation failure returns no batch or partial member. The inspection's cumulative expansion and frame-processing work limits also apply. A batch owns its read-only streams independently of this inspection. Memory includes retained selected bytes, input and decoder buffers; limits are not a peak-RSS guarantee.
Parameters
- ordinals System.Collections.Generic.IReadOnlyList<System.Int32>
- Distinct source ordinals from Entries. Their order determines the returned member order.
- maxSelectedBytes System.Int64
- Finite maximum aggregate selected payload bytes retained in this batch; zero permits only empty members.
- cancellationToken System.Threading.CancellationToken = default
- Cancellation for preflight, folder decoding and selected payload copies.
Exceptions
OfficeInspectionResourceLimitException– The selected payload or remaining expansion/work allowance is exhausted.ArgumentException– An ordinal is repeated or the request exceeds the inventory count.ArgumentOutOfRangeException– A size limit is negative or an ordinal is outside the inventory.NotSupportedException– A selected source or compression cannot be read.InvalidDataException– Selected payloads exceed their limit, decoded content is corrupt or a cumulative inspection limit is exceeded.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public IReadOnlyList<ArchiveInspectionEntry> Entries { get; } #Authored CAB records or MSI File rows in source order, including aliases and unsupported source profiles.
public IReadOnlyList<ArchiveStorageStream> StorageStreams { get; private set; } #Inert raw MSI storage streams in compound directory traversal order; empty for CAB.
public Int64 ReadBytes { get; } #Cumulative charged expanded folder and raw stream bytes, including attempted reads that fail.
public Int64 DecompressionWorkBytes { get; } #Cumulative CAB frame-processing work charged across member reads, including failed attempts after charging. Units bound frame setup and processing rather than exact CPU time or expanded payload size.