PackagePart Class

PackagePart Class

 

Provides a base class for parts stored in a Package. This class is abstract.

Namespace:   System.IO.Packaging
Assembly:  WindowsBase (in WindowsBase.dll)

System.Object
  System.IO.Packaging.PackagePart
    System.IO.Packaging.ZipPackagePart

public abstract class PackagePart

NameDescription
System_CAPS_protmethodPackagePart(Package, Uri)

Initializes a new instance of the PackagePart class with a specified parent Package and part URI.

System_CAPS_protmethodPackagePart(Package, Uri, String)

Initializes a new instance of the PackagePart class with a specified parent Package, part URI, and MIME content type.

System_CAPS_protmethodPackagePart(Package, Uri, String, CompressionOption)

Initializes a new instance of the PackagePart class with a specified parent Package, part URI, MIME content type, and CompressionOption.

NameDescription
System_CAPS_pubpropertyCompressionOption

Gets the compression option of the part content stream.

System_CAPS_pubpropertyContentType

Gets the MIME type of the content stream.

System_CAPS_pubpropertyPackage

Gets the parent Package of the part.

System_CAPS_pubpropertyUri

Gets the URI of the part.

NameDescription
System_CAPS_pubmethodCreateRelationship(Uri, TargetMode, String)

Creates a part-level relationship between this PackagePart to a specified target PackagePart or external resource.

System_CAPS_pubmethodCreateRelationship(Uri, TargetMode, String, String)

Creates a part-level relationship between this PackagePart to a specified target PackagePart or external resource.

System_CAPS_pubmethodDeleteRelationship(String)

Deletes a specified part-level PackageRelationship.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_protmethodGetContentTypeCore()

When overridden in a derived class, returns the MIME type of the part content.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetRelationship(String)

Returns the relationship that has a specified Id.

System_CAPS_pubmethodGetRelationships()

Returns a collection of all the relationships that are owned by this part.

System_CAPS_pubmethodGetRelationshipsByType(String)

Returns a collection of the relationships that match a specified RelationshipType.

System_CAPS_pubmethodGetStream()

Returns the part content data stream.

System_CAPS_pubmethodGetStream(FileMode)

Returns the content stream opened in a specified I/O FileMode.

System_CAPS_pubmethodGetStream(FileMode, FileAccess)

Returns the part content stream opened with a specified FileMode and FileAccess.

System_CAPS_protmethodGetStreamCore(FileMode, FileAccess)

When overridden in a derived class, returns the part content stream opened with a specified FileMode and FileAccess.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRelationshipExists(String)

Returns a value that indicates whether this part owns a relationship with a specified Id.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

A PackagePart consists of three basic elements:

Access

Description

Uri

The URI of the part.

ContentType

The MIME type of the content stream.

GetStream

The content data stream of the part.

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft