System.IO.Packaging 命名空间
提供支持在单个容器中存储多个数据对象的类。 Provides classes that support storage of multiple data objects in a single container.
类
| EncryptedPackageEnvelope |
表示包含加密包的 OLE 复合文件。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 |
表示源 Package 或 PackagePart 与可以为 PackagePart 或外部资源的目标对象之间的关联。Represents an association between a source Package or PackagePart, and a target object which can be a PackagePart or external resource. |
| PackageRelationshipCollection |
表示为给定的 PackageRelationship 或 PackagePart 所拥有的 Package 元素的集合。Represents a collection of PackageRelationship elements that are owned by a given PackagePart or the Package. |
| PackageRelationshipSelector |
定义 PackageRelationship 条件来选择部分级或包级关系。Defines PackageRelationship criteria to select part-level or package-level relationships. |
| PackageStore |
表示结合 Package 使用的应用程序特定的 PackWebRequest 实例的集合。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 |
表示创建包 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 文件是的主要物理格式 Package 。A 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.Open 。Although Package is an abstract class, the ZipPackage derived class is used as default by the Package.Open method.
PackagePart("Part")是表示存储在中的对象的抽象类 Package 。A PackagePart ("part") is the abstract class that represents an object that is stored in a Package.
PackageRelationship("关系")定义源 Package 对象或目标对象之间的关联 PackagePart 。A 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.CreateRelationship )Package-level relationship (created by Package.CreateRelationship)
部分级别关系(由创建 PackagePart.CreateRelationship )Part-level relationship (created by PackagePart.CreateRelationship)
PackagePart在源和包中的另一个目标部分之间。Between a source PackagePart and another target part in the package.
源 PackagePart 和目标资源在包外。Between a source PackagePart and a target resource outside the package.
关系的源 Package 或源 PackagePart 被视为关系的 "所有者"。The 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("数字签名")是部件和关系的组合,表示包含在中的数字签名 Package 。A 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 使用包来存储页面和文档的内容、资源和关系。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.
有关详细信息,请参阅Windows 硬件开发人员中心的 XPS 部分的开放打包约定(OPC)规范。For more information, see the Open Packaging Conventions (OPC) specification, available for download at the XPS section of Windows Hardware Developer Central.