Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the DirectorySearcher class with
 /// SearchScope set to its default value. SearchRoot, Filter, and
 /// PropertiesToLoad are set to the specified values.
 /// </summary>
 /// <param name="searchRoot">
 /// The node in the Active Directory hierarchy where the search starts.
 /// The SearchRoot property is initialized to this value
 /// </param>
 /// <param name="filter">
 /// The search filter string in Lightweight Directory Access Protocol
 /// (Ldap) format. The Filter property is initialized to this value.
 /// </param>
 /// <param name="propertiesToLoad">
 /// The set of properties retrieved during the search. The
 /// PropertiesToLoad property is initialized to this value.
 /// </param>
 public DirectorySearcher(DirectoryEntry searchRoot,
                          string filter,
                          string[] propertiesToLoad)
 {
     _SearchRoot = searchRoot;
     _Filter     = filter;
     PropertiesToLoad.AddRange(propertiesToLoad);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the DirectorySearcher class with
 /// SearchRoot set to its default value. Filter, PropertiesToLoad,
 /// and SearchScope are set to the specified values
 /// </summary>
 /// <param name="filter">
 /// The search filter string in Lightweight Directory Access Protocol
 /// (Ldap) format. The Filter property is initialized to this value.
 /// </param>
 /// <param name="propertiesToLoad">
 /// The set of properties to retrieve during the search. The
 /// PropertiesToLoad property is initialized to this value.
 /// </param>
 /// <param name="scope">
 /// The scope of the search that is observed by the server. The
 /// SearchScope property is initialized to this value.
 /// </param>
 public DirectorySearcher(string filter,
                          string[] propertiesToLoad,
                          SearchScope scope)
 {
     _SearchScope = scope;
     _Filter      = filter;
     PropertiesToLoad.AddRange(propertiesToLoad);
 }
 /// <include file='doc\DirectorySearcher.uex' path='docs/doc[@for="DirectorySearcher.DirectorySearcher7"]/*' />
 /// <devdoc>
 /// <para>Initializes a new instance of the <see cref='System.DirectoryServices.DirectorySearcher'/> class with the <see cref='System.DirectoryServices.DirectorySearcher.SearchRoot'/>, <see cref='System.DirectoryServices.DirectorySearcher.Filter'/>, <see cref='System.DirectoryServices.DirectorySearcher.PropertiesToLoad'/>, and <see cref='System.DirectoryServices.DirectorySearcher.SearchScope'/> properties set to the given
 ///    values.</para>
 /// </devdoc>
 public DirectorySearcher(DirectoryEntry searchRoot, string filter, string[] propertiesToLoad, SearchScope scope)
 {
     this.searchRoot = searchRoot;
     this.filter     = filter;
     if (propertiesToLoad != null)
     {
         PropertiesToLoad.AddRange(propertiesToLoad);
     }
     this.SearchScope = scope;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the DirectorySearcher class with
 /// SearchRoot and SearchScope set to the default values. Filter and
 /// PropertiesToLoad are set to the specified values.
 /// </summary>
 /// <param name="filter">
 /// The search filter string in Lightweight Directory Access Protocol
 /// (Ldap) format. The Filter property is initialized to this value.
 /// </param>
 /// <param name="propertiesToLoad">
 /// The set of properties to retrieve during the search. The
 /// PropertiesToLoad property is initialized to this value.
 /// </param>
 public DirectorySearcher(string filter,
                          string[] propertiesToLoad)
 {
     _Filter = filter;
     PropertiesToLoad.AddRange(propertiesToLoad);
 }