Files
2026-06-04 11:42:34 +02:00

83 lines
5.1 KiB
C#

using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a combination of a user's identity, an access mask, and audit conditions. An <see cref="T:System.Security.AccessControl.ObjectAuditRule" /> object also contains information about the type of object to which the rule applies, the type of child object that can inherit the rule, how the rule is inherited by child objects, and how that inheritance is propagated.</summary>
// Token: 0x020004D3 RID: 1235
public abstract class ObjectAuditRule : AuditRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.ObjectAuditRule" /> class.</summary>
/// <param name="identity">The identity to which the access rule applies. It must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true if this rule is inherited from a parent container.</param>
/// <param name="inheritanceFlags">Specifies the inheritance properties of the access rule.</param>
/// <param name="propagationFlags">Whether inherited access rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="objectType">The type of object to which the rule applies.</param>
/// <param name="inheritedObjectType">The type of child object that can inherit the rule.</param>
/// <param name="auditFlags">The audit conditions.</param>
/// <exception cref="T:System.ArgumentException">The value of the <paramref name="identity" /> parameter cannot be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />, or the <paramref name="type" /> parameter contains an invalid value.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The value of the <paramref name="accessMask" /> parameter is 0, or the <paramref name="inheritanceFlags" /> or <paramref name="propagationFlags" /> parameters contain unrecognized flag values.</exception>
// Token: 0x06002DC7 RID: 11719 RVA: 0x00093EE0 File Offset: 0x000920E0
protected ObjectAuditRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid objectType, Guid inheritedObjectType, AuditFlags auditFlags)
: base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, auditFlags)
{
this.object_type = objectType;
this.inherited_object_type = inheritedObjectType;
}
/// <summary>Gets the type of child object that can inherit the <see cref="System.Security.AccessControl.ObjectAuditRule" /> object.</summary>
/// <returns>The type of child object that can inherit the <see cref="System.Security.AccessControl.ObjectAuditRule" /> object.</returns>
// Token: 0x17000904 RID: 2308
// (get) Token: 0x06002DC8 RID: 11720 RVA: 0x00093F04 File Offset: 0x00092104
public Guid InheritedObjectType
{
get
{
return this.inherited_object_type;
}
}
/// <summary>
/// <see cref="P:System.Security.AccessControl.ObjectAuditRule.ObjectType" /> and <see cref="P:System.Security.AccessControl.ObjectAuditRule.InheritedObjectType" /> properties of the <see cref="System.Security.AccessControl.ObjectAuditRule" /> object contain valid values.</summary>
/// <returns>
/// <see cref="F:System.Security.AccessControl.ObjectAceFlags.ObjectAceTypePresent" /> specifies that the <see cref="P:System.Security.AccessControl.ObjectAuditRule.ObjectType" /> property contains a valid value. <see cref="F:System.Security.AccessControl.ObjectAceFlags.InheritedObjectAceTypePresent" /> specifies that the <see cref="P:System.Security.AccessControl.ObjectAuditRule.InheritedObjectType" /> property contains a valid value. These values can be combined with a logical OR.</returns>
// Token: 0x17000905 RID: 2309
// (get) Token: 0x06002DC9 RID: 11721 RVA: 0x00093F0C File Offset: 0x0009210C
public ObjectAceFlags ObjectFlags
{
get
{
ObjectAceFlags objectAceFlags = ObjectAceFlags.None;
if (this.object_type != Guid.Empty)
{
objectAceFlags |= ObjectAceFlags.ObjectAceTypePresent;
}
if (this.inherited_object_type != Guid.Empty)
{
objectAceFlags |= ObjectAceFlags.InheritedObjectAceTypePresent;
}
return objectAceFlags;
}
}
/// <summary>Gets the type of object to which the <see cref="System.Security.AccessControl.ObjectAuditRule" /> applies.</summary>
/// <returns>The type of object to which the <see cref="System.Security.AccessControl.ObjectAuditRule" /> applies.</returns>
// Token: 0x17000906 RID: 2310
// (get) Token: 0x06002DCA RID: 11722 RVA: 0x00093F50 File Offset: 0x00092150
public Guid ObjectType
{
get
{
return this.object_type;
}
}
// Token: 0x04001218 RID: 4632
private Guid inherited_object_type;
// Token: 0x04001219 RID: 4633
private Guid object_type;
}
}