IsolatedStoragePermission Class

Definition

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

public ref class IsolatedStoragePermission abstract : System::Security::CodeAccessPermission, System::Security::Permissions::IUnrestrictedPermission
public abstract class IsolatedStoragePermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
[System.Serializable]
public abstract class IsolatedStoragePermission : 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
Inheritance
IsolatedStoragePermission
Derived
Attributes
Implements

Remarks

此类是一个抽象基类。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.

Constructors

IsolatedStoragePermission(PermissionState)

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

Properties

UsageAllowed

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

UserQuota

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

Methods

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()

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

(Inherited from CodeAccessPermission)
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()

防止处于调用堆栈较高位置的调用函数使用可以调用此方法来访问当前实例指定资源的代码。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)

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

(Inherited from CodeAccessPermission)
FromXml(SecurityElement)

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

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()

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

(Inherited from Object)
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)

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

(Inherited from CodeAccessPermission)
IsUnrestricted()

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

MemberwiseClone()

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

(Inherited from Object)
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()

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

(Inherited from CodeAccessPermission)
ToXml()

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

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)

Explicit Interface Implementations

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

Applies to

See also