/// <summary> Constructs an LdapSearchConstraints object initialized with values
/// from an existing constraints object (LdapConstraints
/// or LdapSearchConstraints).
/// </summary>
public LdapSearchConstraints(LdapConstraints cons) : base(cons.TimeLimit, cons.ReferralFollowing, cons.getReferralHandler(), cons.HopLimit)
{
InitBlock();
LdapControl[] lsc = cons.getControls();
if (lsc != null)
{
LdapControl[] generated_var = new LdapControl[lsc.Length];
lsc.CopyTo(generated_var, 0);
setControls(generated_var);
}
System.Collections.Hashtable lp = cons.Properties;
if (lp != null)
{
Properties = (System.Collections.Hashtable)lp.Clone();
}
if (cons is LdapSearchConstraints)
{
LdapSearchConstraints scons = (LdapSearchConstraints)cons;
serverTimeLimit = scons.ServerTimeLimit;
dereference = scons.Dereference;
maxResults = scons.MaxResults;
batchSize = scons.BatchSize;
}
// Get a unique connection name for debug
}