PipeSecurity.SetAuditRule(PipeAuditRule) 方法
定义
在与当前 PipeSecurity 对象关联的系统访问控制列表 (SACL) 中设置审核规则。Sets an audit rule in the System Access Control List (SACL) that is associated with the current PipeSecurity object.
public:
void SetAuditRule(System::IO::Pipes::PipeAuditRule ^ rule);
public void SetAuditRule (System.IO.Pipes.PipeAuditRule rule);
override this.SetAuditRule : System.IO.Pipes.PipeAuditRule -> unit
Public Sub SetAuditRule (rule As PipeAuditRule)
参数
- rule
- PipeAuditRule
要设置的规则。The rule to set.
例外
rule 参数为 null。The rule parameter is null.
注解
SetAuditRule方法添加指定的审核规则或覆盖与参数的值匹配的任何相同的审核规则 PipeAccessRights rule 。The SetAuditRule method adds the specified audit rule or overwrites any identical audit rules that match the PipeAccessRights value of the rule parameter. 例如,如果 rule 参数指定一个值, Read 并且该 SetAuditRule 方法找到指定该值的相同审核规则 Read ,则将覆盖相同的规则。For example, if the rule parameter specifies a Read value and the SetAuditRule method finds an identical audit rule that specifies the Read value, the identical rule will be overwritten. 如果该 SetAuditRule 方法找到指定值的相同审核规则 Write ,则不会覆盖相同的规则。If the SetAuditRule method finds an identical audit rule that specifies the Write value, the identical rule will not be overwritten.