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

◆ MarshalHeader()

void System.Security.AccessControl.GenericAce.MarshalHeader ( byte[] binaryForm,
int offset )
inlinepackageinherited

Definition at line 82 of file GenericAce.cs.

83 {
84 int binaryLength = BinaryLength;
85 if (binaryForm == null)
86 {
87 throw new ArgumentNullException("binaryForm");
88 }
89 if (offset < 0)
90 {
91 throw new ArgumentOutOfRangeException("offset", System.SR.ArgumentOutOfRange_NeedNonNegNum);
92 }
93 if (binaryForm.Length - offset < BinaryLength)
94 {
95 throw new ArgumentOutOfRangeException("binaryForm", System.SR.ArgumentOutOfRange_ArrayTooSmall);
96 }
97 if (binaryLength > 65535)
98 {
99 throw new InvalidOperationException();
100 }
101 binaryForm[offset] = (byte)AceType;
102 binaryForm[offset + 1] = (byte)AceFlags;
103 binaryForm[offset + 2] = (byte)binaryLength;
104 binaryForm[offset + 3] = (byte)(binaryLength >> 8);
105 }
static string ArgumentOutOfRange_ArrayTooSmall
Definition SR.cs:74
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
Definition SR.cs:7

References System.SR.ArgumentOutOfRange_ArrayTooSmall, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.Security.AccessControl.GenericAce.BinaryLength, and System.offset.

Referenced by System.Security.AccessControl.CommonAce.GetBinaryForm(), System.Security.AccessControl.CompoundAce.GetBinaryForm(), System.Security.AccessControl.CustomAce.GetBinaryForm(), and System.Security.AccessControl.ObjectAce.GetBinaryForm().