Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AuthorizationRule()

System.Security.AccessControl.AuthorizationRule.AuthorizationRule ( IdentityReference identity,
int accessMask,
bool isInherited,
InheritanceFlags inheritanceFlags,
PropagationFlags propagationFlags )
inlinepackage

Definition at line 27 of file AuthorizationRule.cs.

28 {
29 if (identity == null)
30 {
31 throw new ArgumentNullException("identity");
32 }
33 if (accessMask == 0)
34 {
35 throw new ArgumentException(System.SR.Argument_ArgumentZero, "accessMask");
36 }
37 if ((inheritanceFlags < InheritanceFlags.None) || inheritanceFlags > (InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit))
38 {
39 throw new ArgumentOutOfRangeException("inheritanceFlags", System.SR.Format(System.SR.Argument_InvalidEnumValue, inheritanceFlags, "InheritanceFlags"));
40 }
41 if ((propagationFlags < PropagationFlags.None) || propagationFlags > (PropagationFlags.NoPropagateInherit | PropagationFlags.InheritOnly))
42 {
43 throw new ArgumentOutOfRangeException("propagationFlags", System.SR.Format(System.SR.Argument_InvalidEnumValue, inheritanceFlags, "PropagationFlags"));
44 }
45 if (!identity.IsValidTargetType(typeof(SecurityIdentifier)))
46 {
48 }
49 _identity = identity;
50 _accessMask = accessMask;
51 _isInherited = isInherited;
52 _inheritanceFlags = inheritanceFlags;
53 if (inheritanceFlags != 0)
54 {
55 _propagationFlags = propagationFlags;
56 }
57 else
58 {
60 }
61 }
static string Arg_MustBeIdentityReferenceType
Definition SR.cs:16
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Argument_ArgumentZero
Definition SR.cs:52
static string Argument_InvalidEnumValue
Definition SR.cs:18
Definition SR.cs:7

References System.Security.AccessControl.AuthorizationRule._accessMask, System.Security.AccessControl.AuthorizationRule._identity, System.Security.AccessControl.AuthorizationRule._inheritanceFlags, System.Security.AccessControl.AuthorizationRule._isInherited, System.Security.AccessControl.AuthorizationRule._propagationFlags, System.SR.Arg_MustBeIdentityReferenceType, System.SR.Argument_ArgumentZero, System.SR.Argument_InvalidEnumValue, System.SR.Format(), and System.Security.Principal.IdentityReference.IsValidTargetType().