AccessRule<T> 类

定义

表示用户的标识、访问掩码和访问控制类型(允许或拒绝)的组合。Represents a combination of a user's identity, an access mask, and an access control type (allow or deny). AccessRule`1 对象还包含有关子对象如何继承规则以及如何传播继承的信息。An AccessRule`1 object also contains information about the how the rule is inherited by child objects and how that inheritance is propagated.

generic <typename T>
 where T : value classpublic ref class AccessRule : System::Security::AccessControl::AccessRule
public class AccessRule<T> : System.Security.AccessControl.AccessRule where T : struct
type AccessRule<'T (requires 'T : struct)> = class
    inherit AccessRule
Public Class AccessRule(Of T)
Inherits AccessRule

类型参数

T

访问规则的访问权限类型。The access rights type for the access rule.

继承

注解

) 为类型 T 的访问权限 (权限,可在 int 中键入或转换。例如,可以将转换为 FileSystemRights 访问权限类型,然后通常使用该实例。Access rights (permissions) are type T, which you can type-cast to or from an int. For example, you can cast a FileSystemRights as the access rights type, and then use the instance normally. 相反, AccessRule 始终使用 int 类型的访问权限。In contrast, AccessRule always takes access rights of type int.

构造函数

AccessRule<T>(IdentityReference, T, AccessControlType)

使用指定的值初始化 AccessRule’1 类的一个新实例。Initializes a new instance of the AccessRule'1 class by using the specified values.

AccessRule<T>(IdentityReference, T, InheritanceFlags, PropagationFlags, AccessControlType)

使用指定的值初始化 AccessRule’1 类的一个新实例。Initializes a new instance of the AccessRule'1 class by using the specified values.

AccessRule<T>(String, T, AccessControlType)

使用指定的值初始化 AccessRule’1 类的一个新实例。Initializes a new instance of the AccessRule'1 class by using the specified values.

AccessRule<T>(String, T, InheritanceFlags, PropagationFlags, AccessControlType)

使用指定的值初始化 AccessRule’1 类的一个新实例。Initializes a new instance of the AccessRule'1 class by using the specified values.

属性

AccessControlType

获取与此 AccessControlType 对象关联的 AccessRule 对象。Gets the AccessControlType value associated with this AccessRule object.

(继承自 AccessRule)
AccessMask

获取此规则的访问掩码。Gets the access mask for this rule.

(继承自 AuthorizationRule)
IdentityReference

获取对其应用此规则的 IdentityReferenceGets the IdentityReference to which this rule applies.

(继承自 AuthorizationRule)
InheritanceFlags

获取用于确定子对象如何继承此规则的标志的值。Gets the value of flags that determine how this rule is inherited by child objects.

(继承自 AuthorizationRule)
IsInherited

获取一个值,该值指示此规则是否为显式设置或继承自父级容器对象。Gets a value indicating whether this rule is explicitly set or is inherited from a parent container object.

(继承自 AuthorizationRule)
PropagationFlags

获取传播标志的值,该值确定如何将此规则的继承传播到子对象。Gets the value of the propagation flags, which determine how inheritance of this rule is propagated to child objects. 仅当 InheritanceFlags 枚举的值不为 None 时,此属性才有意义。This property is significant only when the value of the InheritanceFlags enumeration is not None.

(继承自 AuthorizationRule)
Rights

获取当前实例的权限。Gets the rights of the current instance.

方法

Equals(Object)

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

(继承自 Object)
GetHashCode()

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

(继承自 Object)
GetType()

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

(继承自 Object)
MemberwiseClone()

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

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于