public IEnumerable <TokenPrivilege> GetPrivileges()
        {
            var result = Result;

            LuidAndAttributes[] luids = new LuidAndAttributes[result.PrivilegeCount];
            Data.ReadArray(0, luids, 0, luids.Length);
            return(luids.Select(l => new TokenPrivilege(l.Luid, l.Attributes)).ToArray());
        }
        internal PrivilegeCheckResult(SafePrivilegeSetBuffer privileges, bool all_privileges_held)
        {
            var result = privileges.Result;

            LuidAndAttributes[] luids = new LuidAndAttributes[result.PrivilegeCount];
            privileges.Data.ReadArray(0, luids, 0, luids.Length);
            Privileges        = luids.Select(l => new TokenPrivilege(l.Luid, l.Attributes)).ToList().AsReadOnly();
            AllPrivilegesHeld = all_privileges_held;
        }