internal override bool VisitTerm(
                TermExpr <DomainConstraint <BoolLiteral, Constant> > expression)
            {
                MemberRestriction boolLiteral = BoolExpression.GetBoolLiteral(expression) as MemberRestriction;

                return(boolLiteral == null || boolLiteral.IsComplete);
            }
        internal void UpdateWhereClause(MemberDomainMap domainMap)
        {
            List <BoolExpression> boolExpressionList = new List <BoolExpression>();

            foreach (BoolExpression atom in this.WhereClause.Atoms)
            {
                MemberRestriction      asLiteral         = atom.AsLiteral as MemberRestriction;
                IEnumerable <Constant> domain            = domainMap.GetDomain(asLiteral.RestrictedMemberSlot.MemberPath);
                MemberRestriction      memberRestriction = asLiteral.CreateCompleteMemberRestriction(domain);
                ScalarRestriction      scalarRestriction = asLiteral as ScalarRestriction;
                bool flag = scalarRestriction != null && !scalarRestriction.Domain.Contains(Constant.Null) && !scalarRestriction.Domain.Contains(Constant.NotNull) && !scalarRestriction.Domain.Contains(Constant.Undefined);
                if (flag)
                {
                    domainMap.AddSentinel(memberRestriction.RestrictedMemberSlot.MemberPath);
                }
                boolExpressionList.Add(BoolExpression.CreateLiteral((BoolLiteral)memberRestriction, domainMap));
                if (flag)
                {
                    domainMap.RemoveSentinel(memberRestriction.RestrictedMemberSlot.MemberPath);
                }
            }
            if (boolExpressionList.Count <= 0)
            {
                return;
            }
            this.m_whereClause = BoolExpression.CreateAnd(boolExpressionList.ToArray());
        }
 private static IEnumerable <MemberRestriction> GetConjunctsFromWhereClause(
     BoolExpression whereClause)
 {
     foreach (BoolExpression atom in whereClause.Atoms)
     {
         if (!atom.IsTrue)
         {
             MemberRestriction result = atom.AsLiteral as MemberRestriction;
             yield return(result);
         }
     }
 }
        protected override bool IsIdentifierEqualTo(BoolLiteral right)
        {
            MemberRestriction memberRestriction = right as MemberRestriction;

            if (memberRestriction == null)
            {
                return(false);
            }
            if (object.ReferenceEquals((object)this, (object)memberRestriction))
            {
                return(true);
            }
            return(ProjectedSlot.EqualityComparer.Equals((ProjectedSlot)this.m_restrictedMemberSlot, (ProjectedSlot)memberRestriction.m_restrictedMemberSlot));
        }