IsolatedStorageFilePermission 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
Code Access Security is not supported or honored by the runtime.
指定专用虚拟文件系统的允许使用。 此类不能被继承。
public ref class IsolatedStorageFilePermission sealed : 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
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}")>]
type IsolatedStorageFilePermission = class
inherit IsolatedStoragePermission
[<System.Serializable>]
type IsolatedStorageFilePermission = class
inherit IsolatedStoragePermission
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type IsolatedStorageFilePermission = class
inherit IsolatedStoragePermission
type IsolatedStorageFilePermission = class
inherit IsolatedStoragePermission
Public NotInheritable Class IsolatedStorageFilePermission
Inherits IsolatedStoragePermission
- 继承
- 特性
注解
Caution
代码访问安全性(CAS)已在 .NET Framework 和 .NET 的所有版本中弃用。 如果使用与 CAS 相关的 API,最新版本的 .NET 不会遵循 CAS 注释,并会生成错误。 开发人员应寻求完成安全任务的替代方法。
公共语言运行时(CLR)使用此类来控制对独立存储的访问。
独立存储创建唯一的存储区域供应用程序或组件使用。 它提供真正的隔离,即应用程序标识唯一地确定虚拟文件系统的根目录,而虚拟文件系统只能访问该根目录。 因此,每个应用程序都有自己的文件区域自动分配给它。 此文件区域与其他应用程序完全隔离,使其专用于该应用程序。
注释
如果使用 Assert, PermitOnly或者 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) |
已过时.
创建一个权限,该权限是当前权限和指定权限的并集。 |