System.IO.IsolatedStorage 命名空间

System.IO.IsolatedStorage 命名空间包含允许创建和使用独立存储区的类型。 The System.IO.IsolatedStorage namespace contains types that allow the creation and use of isolated stores. 使用这些存储区可以读取和写入不太受信任的代码无法访问的数据,并可以防止公开保存在文件系统其他位置的敏感信息。 With these stores, you can read and write data that less trusted code cannot access and prevent the exposure of sensitive information that can be saved elsewhere on the file system. 数据存储在由当前用户和由代码所在的程序集分隔的隔室中。 Data is stored in compartments that are isolated by the current user and by the assembly in which the code exists. 另外,数据可以由域进行隔离。 Additionally, data can be isolated by domain. 漫游配置文件可以和独立存储一起使用,这样独立存储区将随用户的配置文件一起移动。 Roaming profiles can be used in conjunction with isolated storage so isolated stores will travel with the user's profile. IsolatedStorageScope 枚举指示隔离的不同类型。 The IsolatedStorageScope enumeration indicates different types of isolation. 有关何时使用独立存储的更多信息,请参见独立存储 For more information about when to use isolated storage, see Isolated Storage.

IsolatedStorage

表示所有独立存储实现都必须从中派生的抽象基类。Represents the abstract base class from which all isolated storage implementations must derive.

IsolatedStorageException

独立存储中的操作失败时所引发的异常。The exception that is thrown when an operation in isolated storage fails.

IsolatedStorageFile

表示包含文件和目录的独立存储区。Represents an isolated storage area containing files and directories.

IsolatedStorageFileStream

公开独立存储中的文件。Exposes a file within isolated storage.

IsolatedStorageSecurityState

提供用于维护独立存储的配额大小的设置。Provides settings for maintaining the quota size for isolated storage.

接口

INormalizeForIsolatedStorage

启用独立存储和应用程序域与程序集的证据之间的比较。Enables comparisons between an isolated store and an application domain and assembly's evidence.

枚举

IsolatedStorageScope

枚举受 IsolatedStorage 支持的独立存储范围级别。Enumerates the levels of isolated storage scope that are supported by IsolatedStorage.

IsolatedStorageSecurityOptions

指定影响独立存储中安全性的选项。Specifies options that affect security in isolated storage.

注解

IsolatedStorageFile类提供了大部分独立存储的所需功能。The IsolatedStorageFile class provides most of the necessary functionality for isolated storage. 此类用于获取、 删除和管理独立的存储。Use this class to obtain, delete and manage isolated storage. IsolatedStorageFileStream类处理读取和写入到存储的文件。The IsolatedStorageFileStream class handles reading and writing files to a store. 这是类似于读取和写入标准文件 I/O 类中。This is similar to reading and writing in standard File I/O classes. 有关 I/O 的详细信息,请参阅System.IO命名空间。For more information about I/O, see the System.IO namespace.

使用独立的存储的示例,请参阅独立存储For examples using isolated storage, see Isolated Storage