private string CreateFilter(bool dnValue, string attribute, string attributeValue, string defaultFilter) { if (dnValue) { return(filterBuilder.AttachRdnFilter(attributeValue, defaultFilter)); } return(filterBuilder.AttachFilter(attribute, attributeValue, defaultFilter)); }
public virtual IEntryCollection GetGroupsWithEntryAsMemebership(IEntry membershipEntry) { if (membershipEntry == null) { throw new ArgumentNullException("membershipEntry"); } using (var entry = GetGroupEntry()) { var searcher = GetGroupSearcher(entry, SearchScope.Subtree); var mebershipValue = nameParser.GetDn(membershipEntry.Path); searcher.Filter = filterBuilder.AttachFilter(groupConfig.MembershipAttribute, mebershipValue, groupConfig.Filter); return(searcher.FindAll()); } }
private string CreateUserEmailFilter(string emailToMatch) { return(filterBuilder.AttachFilter(configuration.Users.EmailAttribute, emailToMatch, configuration.Users.Filter)); }