Ejemplo n.º 1
0
 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());
             }
         }
     }
 }
Ejemplo n.º 2
0
 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();
             }
         }
     }
 }
Ejemplo n.º 3
0
 public IEnumerable <DirectoryEntry> FindAll(LdapQuery query)
 {
     return(FindAll(query, PropertiesToLoad.ToArray()));
 }
Ejemplo n.º 4
0
 public IEnumerable<DirectoryEntry> FindAll(LdapQuery query)
 {
     return FindAll(query, PropertiesToLoad.ToArray());
 }