コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceControllerAuditRule"/> class for a user account specified in a
 /// <see cref="IdentityReference"/> object.
 /// </summary>
 /// <param name="identity">The name of the user account.</param>
 /// <param name="rights">
 /// One of the <see cref="ServiceControllerAccessRights"/> values that specifies the type of operation associated with the access rule.
 /// </param>
 /// <param name="flags">One of the <see cref="AuditFlags"/> values that specifies when to perform auditing.</param>
 public ServiceControllerAuditRule(string identity, ServiceControllerAccessRights rights, AuditFlags flags)
     : this(new NTAccount(identity), ServiceControllerAccessRule.AccessMaskFromRights(rights), false, flags)
 {
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceControllerAuditRule"/> class for a user account specified in a
 /// <see cref="IdentityReference"/> object.
 /// </summary>
 /// <param name="identity">An <see cref="IdentityReference"/> object that encapsulates a reference to a user account.</param>
 /// <param name="rights">
 /// One of the <see cref="ServiceControllerAccessRights"/> values that specifies the type of operation associated with the access rule.
 /// </param>
 /// <param name="flags">One of the <see cref="AuditFlags"/> values that specifies when to perform auditing.</param>
 public ServiceControllerAuditRule(IdentityReference identity, ServiceControllerAccessRights rights, AuditFlags flags)
     : this(identity, ServiceControllerAccessRule.AccessMaskFromRights(rights), false, flags)
 {
 }