PipeSecurity.AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags) 方法

定义

用指定的值初始化 AuditRule 类的新实例。Initializes a new instance of the AuditRule class with the specified values.

public:
 override System::Security::AccessControl::AuditRule ^ AuditRuleFactory(System::Security::Principal::IdentityReference ^ identityReference, int accessMask, bool isInherited, System::Security::AccessControl::InheritanceFlags inheritanceFlags, System::Security::AccessControl::PropagationFlags propagationFlags, System::Security::AccessControl::AuditFlags flags);
public override sealed System.Security.AccessControl.AuditRule AuditRuleFactory (System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags);
override this.AuditRuleFactory : System.Security.Principal.IdentityReference * int * bool * System.Security.AccessControl.InheritanceFlags * System.Security.AccessControl.PropagationFlags * System.Security.AccessControl.AuditFlags -> System.Security.AccessControl.AuditRule

参数

identityReference
IdentityReference

应用访问规则的标识。The identity that the access rule applies to. 它必须是可以转换为 SecurityIdentifier 对象的对象。It must be an object that can be cast as a SecurityIdentifier object.

accessMask
Int32

此规则的访问掩码。The access mask of this rule. 访问掩码是 32 位的匿名位集合,其含义由单个集成者定义The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators

isInherited
Boolean

如果此规则是从父级容器继承,则为 true;否则为 false。true if this rule is inherited from a parent container; otherwise, false.

inheritanceFlags
InheritanceFlags

InheritanceFlags 值之一,指定访问规则的继承属性。One of the InheritanceFlags values that specifies the inheritance properties of the access rule.

propagationFlags
PropagationFlags

PropagationFlags 值之一,指定是否自动传播继承的访问规则。One of the PropagationFlags values that specifies whether inherited access rules are automatically propagated. 如果将 inheritanceFlags 设置为 None,则忽略传播标志。The propagation flags are ignored if inheritanceFlags is set to None.

flags
AuditFlags

AuditFlags 值之一,指定有效的访问控制类型。One of the AuditFlags values that specifies the valid access control type.

返回

此方法创建的 AuditRule 对象。The AuditRule object that this method creates.

异常

accessMaskinheritanceFlagspropagationFlagsflags 属性指定了无效值。The accessMask, inheritanceFlags, propagationFlags, or flags properties specify an invalid value.

identityReference 属性为 nullThe identityReference property is null.

- 或 --or- accessMask 属性为零。The accessMask property is zero.

identityReference 属性既不是 SecurityIdentifier 类型,也不是可转换为 SecurityIdentifier 类型的类型,如 NTAccountThe identityReference property is neither of type SecurityIdentifier nor of a type, such as NTAccount, that can be converted to type SecurityIdentifier.

注解

创建审核规则的建议方法是使用PipeAuditRule类的构造函数。The recommended way to create audit rules is to use the constructors of the PipeAuditRule class.

适用于