Package.GetPartsCore Method

Definition

When overridden in a derived class, returns an array of all the parts in the package.

C#
protected abstract System.IO.Packaging.PackagePart[] GetPartsCore();

Returns

An array of all the parts that are contained in the package.

Remarks

The derived class GetPartsCore implementation is called by the GetParts method to access and return the array of parts based on the physical format implemented in the derived class.

By default, a ZipPackage derived implementation of the abstract Package class is provided and used. In the default operation, GetParts internally calls GetPartCore of the ZipPackage class to retrieve the parts from a ZIP file.

For more information about the package model and package parts, see Chapter 1 of the Open Packaging Conventions (OPC) specification available for download at https://www.ecma-international.org/publications-and-standards/standards/ecma-376/.

Notes to Implementers

The derived GetPartsCore() implementation should make no assumptions about the order or operations performed by the GetParts() method that calls it.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also