private IConstraint Join(IConstraint with, bool isAnd)
 {
     lock (_cluster)
     {
         Db4objects.Db4o.Internal.Cluster.ClusterConstraint other = Compatible(with);
         IConstraint[] newConstraints = new IConstraint[_constraints.Length];
         for (int i = 0; i < _constraints.Length; i++)
         {
             newConstraints[i] = isAnd ? _constraints[i].And(other._constraints[i]) : _constraints
                                 [i].Or(other._constraints[i]);
         }
         return(new Db4objects.Db4o.Internal.Cluster.ClusterConstraint(_cluster, newConstraints
                                                                       ));
     }
 }
 private Db4objects.Db4o.Internal.Cluster.ClusterConstraint Compatible(IConstraint
                                                                       with)
 {
     if (!(with is Db4objects.Db4o.Internal.Cluster.ClusterConstraint))
     {
         throw new ArgumentException();
     }
     Db4objects.Db4o.Internal.Cluster.ClusterConstraint other = (Db4objects.Db4o.Internal.Cluster.ClusterConstraint
                                                                 )with;
     if (other._constraints.Length != _constraints.Length)
     {
         throw new ArgumentException();
     }
     return(other);
 }