/// <summary>
        /// Query Active Directory and return all users matching the LDAP query
        /// </summary>
        /// <param name="ldapFilter">An LDAP query to match users against</param>
        /// <returns>The set of users matching the query</returns>
        public ExchangeUserDict QueryActiveDirectory( string ldapFilter )
        {
            SearchResultCollection searchResults = null;

            /* Perform the mailbox search */
            using (ActiveDirectoryService ad = new ActiveDirectoryService())
            {
                searchResults = ad.SearchDirectory( ldapFilter );
            }

            ExchangeUserDict exchangeUsers = CreateExchangeUserCollection( searchResults );

            return exchangeUsers;
        }
        private ExchangeUserDict QueryActiveDirectoryByAttribute(
            string ldapAttribute, params string[] searchTerms )
        {
            SearchResultCollection searchResults = null;

            /* Perform the mailbox search */
            using (ActiveDirectoryService ad = new ActiveDirectoryService())
            {
                searchResults = ad.SearchDirectoryByAttribute( ldapAttribute, searchTerms);
            }

            ExchangeUserDict userCollection = CreateExchangeUserCollection( searchResults );

            LogQueryResults( userCollection, searchTerms, ldapAttribute );

            return userCollection;
        }