IsolatedStoragePermission IsolatedStoragePermission IsolatedStoragePermission IsolatedStoragePermission Class

定义

表示对一般独立存储功能的访问。Represents access to generic isolated storage capabilities.

public ref class IsolatedStoragePermission abstract : System::Security::CodeAccessPermission, System::Security::Permissions::IUnrestrictedPermission
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public abstract class IsolatedStoragePermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
type IsolatedStoragePermission = class
    inherit CodeAccessPermission
    interface IUnrestrictedPermission
Public MustInherit Class IsolatedStoragePermission
Inherits CodeAccessPermission
Implements IUnrestrictedPermission
继承
IsolatedStoragePermissionIsolatedStoragePermissionIsolatedStoragePermissionIsolatedStoragePermission
派生
属性
实现

注解

此类是一个抽象基类。This class is an abstract base class. 永远不会实例化此类;而使用对其进行扩展,它们表示访问到独立存储的特定类型的类。This class is never instantiated; instead, classes that extend it and represent access to a particular type of isolated storage are used.

构造函数

IsolatedStoragePermission(PermissionState) IsolatedStoragePermission(PermissionState) IsolatedStoragePermission(PermissionState) IsolatedStoragePermission(PermissionState)

用指定的受限制或无限制的权限初始化 IsolatedStoragePermission 类的新实例。Initializes a new instance of the IsolatedStoragePermission class with either restricted or unrestricted permission as specified.

属性

UsageAllowed UsageAllowed UsageAllowed UsageAllowed

获取或设置所允许的独立存储包容类型。Gets or sets the type of isolated storage containment allowed.

UserQuota UserQuota UserQuota UserQuota

获取或设置每位用户的总存储在总大小中的配额。Gets or sets the quota on the overall size of each user's total store.

方法

Assert() Assert() Assert() Assert()

声明调用代码能够通过调用此方法的代码,访问受权限请求保护的资源,即使未对堆栈中处于较高位置的调用方授予访问该资源的权限。Declares that the calling code can access the resource protected by a permission demand through the code that calls this method, even if callers higher in the stack have not been granted permission to access the resource. 使用 Assert() 会引起安全问题。Using Assert() can create security issues.

(Inherited from CodeAccessPermission)
Copy() Copy() Copy() Copy()

由派生类实现时,创建并返回当前权限对象的相同副本。When implemented by a derived class, creates and returns an identical copy of the current permission object.

(Inherited from CodeAccessPermission)
Demand() Demand() Demand() Demand()

如果未给调用堆栈中处于较高位置的所有调用方授予当前实例所指定的权限,则在运行时强制 SecurityExceptionForces a SecurityException at run time if all callers higher in the call stack have not been granted the permission specified by the current instance.

(Inherited from CodeAccessPermission)
Deny() Deny() Deny() Deny()

防止调用堆栈中处于较高位置的调用方通过调用此方法的代码来访问由当前实例指定的资源。Prevents callers higher in the call stack from using the code that calls this method to access the resource specified by the current instance.

(Inherited from CodeAccessPermission)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from CodeAccessPermission)
FromXml(SecurityElement) FromXml(SecurityElement) FromXml(SecurityElement) FromXml(SecurityElement)

从 XML 编码重新构造具有指定状态的权限。Reconstructs a permission with a specified state from an XML encoding.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

获取 CodeAccessPermission 对象的哈希代码,此代码适合在哈希算法和数据结构(例如哈希表)中使用。Gets a hash code for the CodeAccessPermission object that is suitable for use in hashing algorithms and data structures such as a hash table.

(Inherited from CodeAccessPermission)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
Intersect(IPermission) Intersect(IPermission) Intersect(IPermission) Intersect(IPermission)

通过派生类实现时,创建和返回是当前权限和指定权限的交集的权限。When implemented by a derived class, creates and returns a permission that is the intersection of the current permission and the specified permission.

(Inherited from CodeAccessPermission)
IsSubsetOf(IPermission) IsSubsetOf(IPermission) IsSubsetOf(IPermission) IsSubsetOf(IPermission)

通过派生类实现时,确定当前权限是否为指定权限的子集。When implemented by a derived class, determines whether the current permission is a subset of the specified permission.

(Inherited from CodeAccessPermission)
IsUnrestricted() IsUnrestricted() IsUnrestricted() IsUnrestricted()

返回一个值,该值指示当前权限是否为无限制的。Returns a value indicating whether the current permission is unrestricted.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
PermitOnly() PermitOnly() PermitOnly() PermitOnly()

防止调用堆栈中处于较高位置的调用方通过调用此方法的代码来访问除当前实例指定的资源外的所有资源。Prevents callers higher in the call stack from using the code that calls this method to access all resources except for the resource specified by the current instance.

(Inherited from CodeAccessPermission)
ToString() ToString() ToString() ToString()

创建并返回当前权限对象的字符串表示形式。Creates and returns a string representation of the current permission object.

(Inherited from CodeAccessPermission)
ToXml() ToXml() ToXml() ToXml()

创建权限及其当前状态的 XML 编码。Creates an XML encoding of the permission and its current state.

Union(IPermission) Union(IPermission) Union(IPermission) Union(IPermission)

当在派生类中重写时,则创建属于当前权限与指定权限的并集的权限。When overridden in a derived class, creates a permission that is the union of the current permission and the specified permission.

(Inherited from CodeAccessPermission)

显式界面实现

IPermission.Demand() IPermission.Demand() IPermission.Demand() IPermission.Demand() Inherited from CodeAccessPermission
IStackWalk.Assert() IStackWalk.Assert() IStackWalk.Assert() IStackWalk.Assert() Inherited from CodeAccessPermission
IStackWalk.Demand() IStackWalk.Demand() IStackWalk.Demand() IStackWalk.Demand() Inherited from CodeAccessPermission
IStackWalk.Deny() IStackWalk.Deny() IStackWalk.Deny() IStackWalk.Deny() Inherited from CodeAccessPermission
IStackWalk.PermitOnly() IStackWalk.PermitOnly() IStackWalk.PermitOnly() IStackWalk.PermitOnly() Inherited from CodeAccessPermission

安全性

SecurityPermission
用于控制策略的权限。for the right to control policy. 安全操作: InheritanceDemandSecurity action: InheritanceDemand. 关联的枚举: ControlPolicyAssociated enumeration: ControlPolicy

适用于

另请参阅