ContentPackReader.Open
Section titled “ContentPackReader.Open”
- Takes ownership of a readable seekable pack and validates all bytes, entries, and budgets.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Content
Declaration
Section titled “Declaration”public static Inno.Content.PackContentStore Inno.Content.ContentPackReader.Open(System.IO.Stream pack, Inno.Content.ContentPackDescriptor descriptor, Inno.Core.Serialization.SerializationGeneration serialization, Inno.Content.ContentReadLimits? limits = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))Parameters
Section titled “Parameters”Parameter pack: The owned stream; callers must not access it after this call. Failure also disposes it.
Parameter descriptor: The expected complete-pack identity received through validated deployment metadata.
Parameter serialization: The borrowed converter generation used to decode the common content index.
Parameter limits: Explicit finite reading and expansion budgets; null selects the documented defaults.
Parameter cancellationToken: Cancels validation before a store is returned.
Returns
Section titled “Returns”A caller-owned store that retains the stream until every lease and stream has retired.
Exceptions
Section titled “Exceptions”Exception T:System.IO.InvalidDataException: The encoded hash, index, entry inventory, decoded bytes, or reading budgets are invalid.
Exception T:System.OperationCanceledException: Validation was canceled; the input stream is disposed.