public AnnotatedAclEntry ResolveAclEntry(UnresolvedAclEntry e, SecurityTargetKind targetKind) { return(new AnnotatedAclEntry { Entry = new AclEntry { Privilege = Privileges.FirstOrDefault(p => p.SID == e.PrivilegeId), Subject = _memoizer.Memoize(new { e.SubjectId }, sid => SubjectProviders.Select(p => p.Find(sid.SubjectId)).FirstOrDefault(s => s != null)), Kind = e.Allow ? AclEntryKind.Allow : AclEntryKind.Deny }, InheritedFrom = e.IsInherited ? ResolveTarget(e.SourceTarget, targetKind) : null }); }