void IDBCollection.SetConstraint(long Op, DBConstraint constraint) { DBMasterTable.QueryValues which = (DBMasterTable.QueryValues)Op; if (DBMasterTable.QueryValues.All == which && DBConstraint.QueryConstraints.None == constraint.Constraint) { m_Constraints.Clear(); return; } if (DBMasterTable.QueryValues.All != which) { if (DBConstraint.QueryConstraints.None == constraint.Constraint) { m_Constraints.Remove(which); } else { m_Constraints.Add(which, constraint); } } else { foreach (DBMasterTable.QueryValues val in Enum.GetValues(typeof(DBMasterTable.QueryValues))) { if (DBMasterTable.QueryValues.All == val) { continue; } m_Constraints.Add(val, constraint); }//foreach } }
void IDBCollection.SetConstraint(long which, DBConstraint constraint) { if (-1 == which && DBConstraint.QueryConstraints.None == constraint.Constraint) { m_Constraints.Clear(); return; } if (-1 != which) { if (DBConstraint.QueryConstraints.None == constraint.Constraint) { m_Constraints.Remove(which); } else { m_Constraints.Add(which, constraint); } } else { throw new NotImplementedException(); } }