IsolatedStorage 类

定义

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

public ref class IsolatedStorage abstract : MarshalByRefObject
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class IsolatedStorage : MarshalByRefObject
type IsolatedStorage = class
    inherit MarshalByRefObject
Public MustInherit Class IsolatedStorage
Inherits MarshalByRefObject
继承
IsolatedStorage
派生
属性

注解

重要

使用不受信任的数据调用此类中的方法存在安全风险。Calling methods from this class with untrusted data is a security risk. 仅使用受信任的数据调用此类中的方法。Call the methods from this class only with trusted data. 有关详细信息,请参阅数据验证For more information, see Data Validation.

有关基于文件的独立存储的信息,请参阅 IsolatedStorageFile 类。For information about file-based isolated storage, see the IsolatedStorageFile class.

重要

独立存储不适用于 Windows 8.x 应用商店Windows 8.x Store 应用。Isolated storage is not available for Windows 8.x 应用商店Windows 8.x Store apps. 相反,使用 Windows.Storage API 中包含的 Windows 运行时Windows Runtime 命名空间中的应用程序数据类来存储本地数据和文件。Instead, use the application data classes in the Windows.Storage namespaces included in the Windows 运行时Windows Runtime API to store local data and files. 有关详细信息,请参阅 Windows 开发人员中心的 应用程序数据For more information, see Application data in the Windows Dev Center.

构造函数

IsolatedStorage()

初始化 IsolatedStorage 类的新实例。Initializes a new instance of the IsolatedStorage class.

属性

ApplicationIdentity

获取用于确定独立存储范围的应用程序标识。Gets an application identity that scopes isolated storage.

AssemblyIdentity

获取用于确定独立存储范围的程序集标识。Gets an assembly identity used to scope isolated storage.

AvailableFreeSpace

在派生类中重写时,获取独立存储的可用空间(以字节为单位)。When overridden in a derived class, gets the available free space for isolated storage, in bytes.

CurrentSize

获取表示独立存储当前大小的值。Gets a value representing the current size of isolated storage.

DomainIdentity

获取用于确定独立存储范围的域标识。Gets a domain identity that scopes isolated storage.

MaximumSize

获取一个值,该值表示独立存储的最大可用空间数量。Gets a value representing the maximum amount of space available for isolated storage. 当在派生类中重写时,该值可以采用不同的度量单位。When overridden in a derived class, this value can take different units of measure.

Quota

在派生类中重写时,获取一个值,该值表示可用于独立存储的最大空间量。When overridden in a derived class, gets a value that represents the maximum amount of space available for isolated storage.

Scope

获取指定用于隔离存储区的范围的 IsolatedStorageScope 枚举值。Gets an IsolatedStorageScope enumeration value specifying the scope used to isolate the store.

SeparatorExternal

获取可在目录字符串中使用的反斜杠字符。Gets a backslash character that can be used in a directory string. 当在派生类中重写后,可能会返回另一个字符。When overridden in a derived class, another character might be returned.

SeparatorInternal

获取可在目录字符串中使用的句点字符。Gets a period character that can be used in a directory string. 当在派生类中重写后,可能会返回另一个字符。When overridden in a derived class, another character might be returned.

UsedSize

在派生类中重写时,获取一个值,该值表示用于独立存储的空间量。When overridden in a derived class, gets a value that represents the amount of the space used for isolated storage.

方法

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(继承自 MarshalByRefObject)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(继承自 MarshalByRefObject)
GetPermission(PermissionSet)

当由派生类实现时,从权限集中返回表示对独立存储的访问权限的权限。When implemented by a derived class, returns a permission that represents access to isolated storage from within a permission set.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
IncreaseQuotaTo(Int64)

在派生类中重写时,将提示用户批准独立存储的更大配额大小(以字节为单位)。When overridden in a derived class, prompts a user to approve a larger quota size, in bytes, for isolated storage.

InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(继承自 MarshalByRefObject)
InitStore(IsolatedStorageScope, Type)

初始化新的 IsolatedStorage 对象。Initializes a new IsolatedStorage object.

InitStore(IsolatedStorageScope, Type, Type)

初始化新的 IsolatedStorage 对象。Initializes a new IsolatedStorage object.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(继承自 MarshalByRefObject)
Remove()

当在派生类中重写时,移除个别独立存储区和包含的所有数据。When overridden in a derived class, removes the individual isolated store and all contained data.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅