System.IO.Packaging 命名空間

提供類別,這些類別支援在單一容器內儲存多個資料物件。 Provides classes that support storage of multiple data objects in a single container.

類別

EncryptedPackageEnvelope

代表包含加密封裝的 OLE 複合檔案 (Compound File)。Represents an OLE compound file that contains an encrypted package.

Package

表示可以儲存多個資料物件的容器。Represents a container that can store multiple data objects.

PackageDigitalSignature

代表套用至一組封裝組件和關聯性的數位簽章。Represents a digital signature that is applied to a set of package parts and relationships.

PackageDigitalSignatureManager

提供公用程式類別,可用來建立及驗證 Package 中的數位簽章。Provides a utility class for the creation and verification of digital signatures in a Package.

PackagePart

提供基底類別給儲存於 Package 中的組件。Provides a base class for parts stored in a Package. 這個類別是抽象的。This class is abstract.

PackagePartCollection

表示 PackagePart 物件的集合。Represents a collection of PackagePart objects.

PackageProperties

表示 Package 的核心屬性。Represents the core properties of a Package.

PackageRelationship

代表來源 PackagePackagePart 以及目標物件 (可能是 PackagePart 或外部資源) 之間的關聯。Represents an association between a source Package or PackagePart, and a target object which can be a PackagePart or external resource.

PackageRelationshipCollection

表示指定之 PackageRelationshipPackagePart 所擁有的 Package 項目集合。Represents a collection of PackageRelationship elements that are owned by a given PackagePart or the Package.

PackageRelationshipSelector

定義選取組件層級或封裝層級之關聯性 (Relationship) 的 PackageRelationship 準則。Defines PackageRelationship criteria to select part-level or package-level relationships.

PackageStore

表示搭配 Package 一起使用之應用程式特有的 PackWebRequest 執行個體 (Instance) 集合。Represents a collection of application-specific Package instances used in combination with PackWebRequest.

PackUriHelper

提供公用程式方法來撰寫和剖析 Pack URI 物件。Provides utility methods to compose and parse pack URI objects.

PackWebRequest

對整個 PackagePart 或套件內的某個 PackagePart 提出要求,由 Pack URI 識別。Makes a request to an entire PackagePart or to a PackagePart in a package, identified by a pack URI.

PackWebRequestFactory

代表建立 Pack URI PackWebRequest 執行個體時所叫用的類別。Represents the class that is invoked when an instance of a pack URI PackWebRequest is created.

PackWebResponse

表示 PackWebRequest 的回應。Represents a response of a PackWebRequest.

RightsManagementInformation

表示儲存在 EncryptedPackageEnvelope 的數位版權管理 (DRM) 資訊。Represents Digital Rights Management (DRM) information that is stored in an EncryptedPackageEnvelope.

SignatureVerificationEventArgs

指定提供給 InvalidSignatureEventHandler 的事件引數。Specifies the event args provided to the InvalidSignatureEventHandler.

StorageInfo

提供存取權和資訊,用來管理 Package 中的資料存放區。Provides access and information for manipulating data stores in a Package.

StreamInfo

提供存取權和資訊,用來管理 Package 內的 I/O 資料流。Provides access and information for manipulating I/O streams within a Package.

ZipPackage

實作抽象 Package 基底類別的衍生子類別,ZipPackage 類別使用 ZIP 封存檔作為容器存放區。Implements a derived subclass of the abstract Package base class - the ZipPackage class uses a ZIP archive as the container store. 此類別無法獲得繼承。This class cannot be inherited.

ZipPackagePart

表示儲存於 ZipPackage 中的一部分。Represents a part that is stored in a ZipPackage.

列舉

CertificateEmbeddingOption

指定用於簽署之 X.509 憑證的儲存位置。Specifies the location where the X.509 certificate that is used in signing is stored.

CompressionOption

指定儲存於 PackagePart 中之內容的壓縮層級。Specifies the compression level for content that is stored in a PackagePart.

EncryptionOption

指定 Package 中組件的加密選項。Specifies the encryption option for parts in a Package.

PackageRelationshipSelectorType

指定透過 PackageRelationship 比對及重新執行 PackageRelationshipSelector 選取項目時所使用之選取準則的型別。Specifies the type of selection criteria that is used to match and return PackageRelationship selections through a PackageRelationshipSelector.

TargetMode

指定 PackageRelationship 的目標在 Package 內部或外部。Specifies whether the target of a PackageRelationship is inside or outside the Package.

VerifyResult

指定憑證或簽章驗證的結果。Specifies the result of a certificate or signature verification.

委派

InvalidSignatureEventHandler

表示方法,會處理當 InvalidSignatureEvent 偵測到無效簽章時所引發的 VerifySignatures(Boolean)Represents the method that handles the InvalidSignatureEvent that is raised when VerifySignatures(Boolean) detects an invalid signature.

備註

Package是一個抽象類別,可以用來將物件組織成定義的實體格式,以提供可攜性和有效率的存取。Package is an abstract class that can be used to organize objects into a single entity of a defined physical format for portability and efficient access.

ZIP 檔案是的主要實體格式 PackageA ZIP file is the primary physical format for the Package. 其他 Package 的執行可能會使用其他實體格式,例如 XML 檔、資料庫或 Web 服務。Other Package implementations might use other physical formats such as an XML document, a database, or Web service.

就像檔案系統一樣,中包含的專案 Package 會在資料夾和檔案的階層式組織中參考。Like a file system, items contained in a Package are referenced in a hierarchical organization of folders and files.

雖然 Package 是抽象類別,但 ZipPackage 方法會使用衍生類別做為預設值 Package.OpenAlthough Package is an abstract class, the ZipPackage derived class is used as default by the Package.Open method.

A PackagePart ("part")是抽象類別,代表儲存在中的物件 PackageA PackagePart ("part") is the abstract class that represents an object that is stored in a Package.

A PackageRelationship ("relationship")定義來源 Package 或目標物件之間的關聯 PackagePartA PackageRelationship ("relationship") defines an association between a source Package or PackagePart and a target object. PackageRelationship可以是兩種類型的其中一種,其中每一個都可以是下列兩種形式的其中一種:A PackageRelationship can be one of two types, each of which can be one of two forms:

關聯性的來源 Package 或來源會被視為關聯性的「擁有者」 PackagePartThe relationship's source Package or source PackagePart is considered the "owner" of the relationship. 刪除來源物件時,也會一併刪除來源物件所擁有的所有關聯性。When the source object is deleted, all the relationships owned by the source object are also deleted. 建立或刪除關聯性的進程並不會以任何方式實際變更來源或目標物件。The process of creating or deleting a relationship does not physically change either the source or target objects in any way.

PackageDigitalSignature(「數位簽章」)是元件和關聯性的組合,代表包含的數位簽章 PackageA PackageDigitalSignature ("digital signature") is a composition of parts and relationships representing a digital signature included with a Package. 數位簽章會識別建立者,並驗證封裝含在中的已簽署元件和關聯性 Package 是否尚未修改。The digital signature identifies the originator and validates that the signed parts and relationships contained in the Package have not been modified.

套件也支援數位 Rights Management (DRM),可讓中的內容元素以 Package 授與授權使用者的特定存取權限進行加密。Packages also support Digital Rights Management (DRM), which allows content elements in a Package to be encrypted with specific access rights granted to authorized users.

根據 Package 架構, XpsDocument 是一種封裝類型,設計用來根據 Open XML 論文規格(XPS)儲存檔。Based on the Package architecture, an XpsDocument is a package type designed for storing documents based on the open XML Paper Specification (XPS).

Windows Presentation Foundation 預設會使用封裝來儲存頁面和檔的內容、資源和關聯性,並使用標準 ZIP 檔案。Windows Presentation Foundation uses packages to store content, resources, and relationships for pages and documents using a standard ZIP file by default. 如同任何 ZIP 檔案,您的應用程式可以使用 System.IO.Packaging 類別來儲存並選擇性地保護單一有效率存取容器中任何類型或資料檔案的數目。As with any ZIP file, your application can use the System.IO.Packaging classes to store and optionally protect any type or number of data files in a single efficient-to-access container.

如需詳細資訊,請參閱開放封裝慣例(OPC)規格,可于Windows 硬體開發人員中心的 XPS 一節下載。For more information, see the Open Packaging Conventions (OPC) specification, available for download at the XPS section of Windows Hardware Developer Central.

另請參閱