Skip to content
API referenceDevelopmentEngine APIEngine ccf7d03f
Synced
  • Takes ownership of a readable seekable pack and validates all bytes, entries, and budgets.

API: engine
Project: Inno.Content

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))

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.

A caller-owned store that retains the stream until every lease and stream has retired.

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.