IsolatedStorageFilePermission 类

定义

注意

Code Access Security is not supported or honored by the runtime.

指定私有虚拟文件系统的允许的用法。 此类不能被继承。

public ref class IsolatedStorageFilePermission sealed : System::Security::Permissions::IsolatedStoragePermission
public sealed class IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission
[System.Serializable]
public sealed class IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission
type IsolatedStorageFilePermission = class
    inherit IsolatedStoragePermission
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type IsolatedStorageFilePermission = class
    inherit IsolatedStoragePermission
[<System.Serializable>]
type IsolatedStorageFilePermission = class
    inherit IsolatedStoragePermission
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type IsolatedStorageFilePermission = class
    inherit IsolatedStoragePermission
Public NotInheritable Class IsolatedStorageFilePermission
Inherits IsolatedStoragePermission
继承
IsolatedStorageFilePermission
属性

注解

注意

代码访问安全性 (CAS) 已在所有版本的 .NET Framework 和 .NET 中弃用。 如果使用与 CAS 相关的 API,最新版本的 .NET 不会遵循 CAS 注释,并会生成错误。 开发人员应寻求用于完成安全任务的替代方法。

公共语言运行时 (CLR) 使用此类来控制对独立存储的访问。

独立存储创建供应用程序或组件使用的唯一存储区域。 它提供了真正的隔离,因为它的应用程序标识唯一地决定虚拟文件系统的根,只有该应用程序可以访问该根。 因此,每个应用程序都有其自己的文件区域自动分配给它。 此文件区域与其他应用程序完全隔离,使其与该应用程序专用。

注意

如果使用 AssertPermitOnly或 为使用情况或 Deny 配额添加堆栈修饰符,则不起作用。 使用情况和配额是根据证据确定的,并且不会针对需求执行堆栈遍查,因此上述操作无效。

构造函数

IsolatedStorageFilePermission(PermissionState)
已过时.

根据指定,使用完全受限制或不受限制的权限初始化 IsolatedStorageFilePermission 类的新实例。

属性

UsageAllowed
已过时.

获取或设置允许的独立存储包含的类型。

(继承自 IsolatedStoragePermission)
UserQuota
已过时.

获取或设置每位用户的总存储在总大小中的配额。

(继承自 IsolatedStoragePermission)

方法

Assert()
已过时.

声明调用代码能够通过调用此方法的代码,访问受权限请求保护的资源,即使未对堆栈中处于较高位置的调用方授予访问该资源的权限。 使用 Assert() 会引起安全问题。

(继承自 CodeAccessPermission)
Copy()
已过时.

创建并返回当前权限的相同副本。

Demand()
已过时.

如果未对调用堆栈中处于较高位置的所有调用方授予当前实例所指定的权限,则在运行时强制 SecurityException

(继承自 CodeAccessPermission)
Deny()
已过时.
已过时.

防止处于调用堆栈较高位置的调用函数使用可以调用此方法来访问当前实例指定资源的代码。

(继承自 CodeAccessPermission)
Equals(Object)
已过时.

确定指定的 CodeAccessPermission 对象是否等于当前的 CodeAccessPermission

(继承自 CodeAccessPermission)
FromXml(SecurityElement)
已过时.

从 XML 编码重新构造具有指定状态的权限。

(继承自 IsolatedStoragePermission)
GetHashCode()
已过时.

获取 CodeAccessPermission 对象的哈希代码,此代码适合在哈希算法和数据结构(例如哈希表)中使用。

(继承自 CodeAccessPermission)
GetType()
已过时.

获取当前实例的 Type

(继承自 Object)
Intersect(IPermission)
已过时.

创建并返回一个权限,该权限是当前权限与指定权限的交集。

IsSubsetOf(IPermission)
已过时.

确定当前权限是否为指定权限的子集。

IsUnrestricted()
已过时.

返回一个值,该值指示当前权限是否不受限制。

(继承自 IsolatedStoragePermission)
MemberwiseClone()
已过时.

创建当前 Object 的浅表副本。

(继承自 Object)
PermitOnly()
已过时.

防止处于调用堆栈较高位置的调用函数使用此代码,此代码将调用此方法来访问除当前实例指定的资源以外的所有资源。

(继承自 CodeAccessPermission)
ToString()
已过时.

创建并返回当前权限对象的字符串表示形式。

(继承自 CodeAccessPermission)
ToXml()
已过时.

创建权限及其当前状态的 XML 编码。

ToXml()
已过时.

创建权限及其当前状态的 XML 编码。

(继承自 IsolatedStoragePermission)
Union(IPermission)
已过时.

创建一个权限,该权限是当前权限与指定权限的并集。

适用于

另请参阅