PackagePart PackagePart PackagePart PackagePart Class

Definition

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

public ref class PackagePart abstract
public abstract class PackagePart
type PackagePart = class
Public MustInherit Class PackagePart
Inheritance
PackagePartPackagePartPackagePartPackagePart
Derived

Remarks

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.

Constructors

PackagePart(Package, Uri) PackagePart(Package, Uri) PackagePart(Package, Uri) PackagePart(Package, Uri)

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

PackagePart(Package, Uri, String) PackagePart(Package, Uri, String) PackagePart(Package, Uri, String) PackagePart(Package, Uri, String)

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

PackagePart(Package, Uri, String, CompressionOption) PackagePart(Package, Uri, String, CompressionOption) PackagePart(Package, Uri, String, CompressionOption) PackagePart(Package, Uri, String, CompressionOption)

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

Properties

CompressionOption CompressionOption CompressionOption CompressionOption

Gets the compression option of the part content stream.

ContentType ContentType ContentType ContentType

Gets the MIME type of the content stream.

Package Package Package Package

Gets the parent Package of the part.

Uri Uri Uri Uri

Gets the URI of the part.

Methods

CreateRelationship(Uri, TargetMode, String) CreateRelationship(Uri, TargetMode, String) CreateRelationship(Uri, TargetMode, String) CreateRelationship(Uri, TargetMode, String)

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

CreateRelationship(Uri, TargetMode, String, String) CreateRelationship(Uri, TargetMode, String, String) CreateRelationship(Uri, TargetMode, String, String) CreateRelationship(Uri, TargetMode, String, String)

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

DeleteRelationship(String) DeleteRelationship(String) DeleteRelationship(String) DeleteRelationship(String)

Deletes a specified part-level PackageRelationship.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetContentTypeCore() GetContentTypeCore() GetContentTypeCore() GetContentTypeCore()

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

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetRelationship(String) GetRelationship(String) GetRelationship(String) GetRelationship(String)

Returns the relationship that has a specified Id.

GetRelationships() GetRelationships() GetRelationships() GetRelationships()

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

GetRelationshipsByType(String) GetRelationshipsByType(String) GetRelationshipsByType(String) GetRelationshipsByType(String)

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

GetStream() GetStream() GetStream() GetStream()

Returns the part content data stream.

GetStream(FileMode) GetStream(FileMode) GetStream(FileMode) GetStream(FileMode)

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

GetStream(FileMode, FileAccess) GetStream(FileMode, FileAccess) GetStream(FileMode, FileAccess) GetStream(FileMode, FileAccess)

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

GetStreamCore(FileMode, FileAccess) GetStreamCore(FileMode, FileAccess) GetStreamCore(FileMode, FileAccess) GetStreamCore(FileMode, FileAccess)

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

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RelationshipExists(String) RelationshipExists(String) RelationshipExists(String) RelationshipExists(String)

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

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also