public AccessControlEntry(SecurityIdentifier trustee, AccessControlEntryType aceType, AccessMask accessMask) { // parameters validation if (trustee == null) throw new ArgumentNullException("trustee"); _aceType = aceType; _aceFlags = AccessControlEntryFlags.Normal; _accessMask = accessMask; Trustee = trustee; }
public AccessControlEntry(SecurityIdentifier trustee, AccessControlEntryType aceType, AccessMask accessMask) { // parameters validation if (trustee == null) { throw new ArgumentNullException("trustee"); } _aceType = aceType; _aceFlags = AccessControlEntryFlags.Normal; _accessMask = accessMask; Trustee = trustee; }
internal AccessControlEntry(IntPtr pAce) { // parameters validation if (pAce == IntPtr.Zero) throw new ArgumentNullException("pAce"); // read ACE properties _aceType = (AccessControlEntryType)MarshalHelper.ReadByte(pAce, typeof(SecurityNative.ACE), "AceType"); _aceFlags = (AccessControlEntryFlags)MarshalHelper.ReadByte(pAce, typeof(SecurityNative.ACE), "AceFlags"); _accessMask = (AccessMask)MarshalHelper.ReadInt32(pAce, typeof(SecurityNative.ACE), "AccessMask"); // read SID IntPtr pSid = IntPtrHelper.Add(pAce, Marshal.OffsetOf(typeof(SecurityNative.ACE), "SidStart")); Trustee = new SecurityIdentifier(pSid, true); }
internal AccessControlEntry(IntPtr pAce) { // parameters validation if (pAce == IntPtr.Zero) { throw new ArgumentNullException("pAce"); } // read ACE properties _aceType = (AccessControlEntryType)MarshalHelper.ReadByte(pAce, typeof(SecurityNative.ACE), "AceType"); _aceFlags = (AccessControlEntryFlags)MarshalHelper.ReadByte(pAce, typeof(SecurityNative.ACE), "AceFlags"); _accessMask = (AccessMask)MarshalHelper.ReadInt32(pAce, typeof(SecurityNative.ACE), "AccessMask"); // read SID IntPtr pSid = IntPtrHelper.Add(pAce, Marshal.OffsetOf(typeof(SecurityNative.ACE), "SidStart")); Trustee = new SecurityIdentifier(pSid, true); }