PackagePart 類別

定義

提供基底類別給儲存於 Package 中的組件。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
繼承
PackagePart
衍生

備註

PackagePart包含三個基本元素:A PackagePart consists of three basic elements:

存取Access 描述Description
Uri 元件的 URI。The URI of the part.
ContentType 內容資料流程的 MIME 類型。The MIME type of the content stream.
GetStream 組件的內容資料流。The content data stream of the part.

建構函式

PackagePart(Package, Uri)

使用指定的父 Package 與組件 URI,初始化 PackagePart 類別的新執行個體。Initializes a new instance of the PackagePart class with a specified parent Package and part URI.

PackagePart(Package, Uri, String)

PackagePart使用指定的父系 Package 、元件 URI 和 MIME 內容類型,初始化類別的新實例。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、MIME 內容類型和,初始化類別的新實例 CompressionOptionInitializes a new instance of the PackagePart class with a specified parent Package, part URI, MIME content type, and CompressionOption.

屬性

CompressionOption

取得組件內容資料流的壓縮選項。Gets the compression option of the part content stream.

ContentType

取得內容資料流程的 MIME 類型。Gets the MIME type of the content stream.

Package

取得組件的父 PackageGets the parent Package of the part.

Uri

取得組件的 URI。Gets the URI of the part.

方法

CreateRelationship(Uri, TargetMode, String)

建立這個 PackagePart 和指定目標 PackagePart 或外部資源之間的組件層級關係。Creates a part-level relationship between this PackagePart to a specified target PackagePart or external resource.

CreateRelationship(Uri, TargetMode, String, String)

建立這個 PackagePart 和指定目標 PackagePart 或外部資源之間的組件層級關係。Creates a part-level relationship between this PackagePart to a specified target PackagePart or external resource.

DeleteRelationship(String)

刪除指定的組件層級 PackageRelationshipDeletes a specified part-level PackageRelationship.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetContentTypeCore()

在衍生類別中覆寫時,傳回元件內容的 MIME 類型。When overridden in a derived class, returns the MIME type of the part content.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetRelationship(String)

傳回具有指定之 Id 的關聯性。Returns the relationship that has a specified Id.

GetRelationships()

傳回這個組件所擁有之全部關聯性的集合。Returns a collection of all the relationships that are owned by this part.

GetRelationshipsByType(String)

傳回符合指定之 RelationshipType 的關聯性集合。Returns a collection of the relationships that match a specified RelationshipType.

GetStream()

傳回部分內容資料流。Returns the part content data stream.

GetStream(FileMode)

傳回在指定之 I/O FileMode 中開啟的內容資料流。Returns the content stream opened in a specified I/O FileMode.

GetStream(FileMode, FileAccess)

傳回以指定之 FileModeFileAccess 開啟的組件內容資料流。Returns the part content stream opened with a specified FileMode and FileAccess.

GetStreamCore(FileMode, FileAccess)

在衍生類別中覆寫時,會傳回以指定之 FileModeFileAccess 開啟的組件內容資料流。When overridden in a derived class, returns the part content stream opened with a specified FileMode and FileAccess.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
RelationshipExists(String)

傳回值,表示這個組件是否擁有包含指定之 Id 的關聯性。Returns a value that indicates whether this part owns a relationship with a specified Id.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於