Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
FileSystemAuditRule.cs
Go to the documentation of this file.
2
4
5public sealed class FileSystemAuditRule : AuditRule
6{
8
9 public FileSystemAuditRule(IdentityReference identity, FileSystemRights fileSystemRights, AuditFlags flags)
10 : this(identity, fileSystemRights, InheritanceFlags.None, PropagationFlags.None, flags)
11 {
12 }
13
14 public FileSystemAuditRule(IdentityReference identity, FileSystemRights fileSystemRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
15 : this(identity, AccessMaskFromRights(fileSystemRights), isInherited: false, inheritanceFlags, propagationFlags, flags)
16 {
17 }
18
19 public FileSystemAuditRule(string identity, FileSystemRights fileSystemRights, AuditFlags flags)
20 : this(new NTAccount(identity), fileSystemRights, InheritanceFlags.None, PropagationFlags.None, flags)
21 {
22 }
23
24 public FileSystemAuditRule(string identity, FileSystemRights fileSystemRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
25 : this(new NTAccount(identity), AccessMaskFromRights(fileSystemRights), isInherited: false, inheritanceFlags, propagationFlags, flags)
26 {
27 }
28
29 internal FileSystemAuditRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
30 : base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, flags)
31 {
32 }
33
34 private static int AccessMaskFromRights(FileSystemRights fileSystemRights)
35 {
36 if (fileSystemRights < (FileSystemRights)0 || fileSystemRights > FileSystemRights.FullControl)
37 {
38 throw new ArgumentOutOfRangeException("fileSystemRights", System.SR.Format(System.SR.Argument_InvalidEnumValue, fileSystemRights, "FileSystemRights"));
39 }
40 return (int)fileSystemRights;
41 }
42}
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Argument_InvalidEnumValue
Definition SR.cs:18
Definition SR.cs:7
static FileSystemRights RightsFromAccessMask(int accessMask)
static int AccessMaskFromRights(FileSystemRights fileSystemRights)
FileSystemAuditRule(IdentityReference identity, FileSystemRights fileSystemRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
FileSystemAuditRule(string identity, FileSystemRights fileSystemRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
FileSystemAuditRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
FileSystemAuditRule(string identity, FileSystemRights fileSystemRights, AuditFlags flags)
FileSystemAuditRule(IdentityReference identity, FileSystemRights fileSystemRights, AuditFlags flags)