public virtual LdapSearchQueue Search(System.String base_Renamed, int scope, System.String filter, System.String[] attrs, bool typesOnly, LdapSearchQueue queue, LdapSearchConstraints cons)
{
if ((System.Object) filter == null)
{
filter = "objectclass=*";
}
if (cons == null)
cons = defSearchCons;
LdapMessage msg = new LdapSearchRequest(base_Renamed, scope, filter, attrs, cons.Dereference, cons.MaxResults, cons.ServerTimeLimit, typesOnly, cons.getControls());
MessageAgent agent;
LdapSearchQueue myqueue = queue;
if (myqueue == null)
{
agent = new MessageAgent();
myqueue = new LdapSearchQueue(agent);
}
else
{
agent = queue.MessageAgent;
}
try
{
agent.sendMessage(conn, msg, cons.TimeLimit, myqueue, null);
}
catch (LdapException lex)
{
throw lex;
}
return myqueue;
}