public IEnumerable <DirectoryEntry> FindAll(LdapQuery query, string[] properties) { using (var root = new DirectoryEntry(GetDirectoryPath())) { using (var searcher = new DirectorySearcher(root)) { searcher.SizeLimit = 1000; if (query != null) { searcher.Filter = query.ToString(); if (properties != null) { searcher.PropertiesToLoad.AddRange(properties); } } foreach (SearchResult de in searcher.FindAll()) { yield return(de.GetDirectoryEntry()); } } } }
public IEnumerable<DirectoryEntry> FindAll(LdapQuery query, string[] properties) { using (var root = new DirectoryEntry(GetDirectoryPath())) { using (var searcher = new DirectorySearcher(root)) { searcher.SizeLimit = 1000; if (query != null) { searcher.Filter = query.ToString(); if (properties != null) { searcher.PropertiesToLoad.AddRange(properties); } } foreach (SearchResult de in searcher.FindAll()) { yield return de.GetDirectoryEntry(); } } } }
public IEnumerable <DirectoryEntry> FindAll(LdapQuery query) { return(FindAll(query, PropertiesToLoad.ToArray())); }
public IEnumerable<DirectoryEntry> FindAll(LdapQuery query) { return FindAll(query, PropertiesToLoad.ToArray()); }