private void MatchPartitionErrors()
        {
            List <LeftCellWrapper> wrappersForExtent = this.m_viewgenContext.AllWrappersForExtent;
            int num = 0;

            foreach (LeftCellWrapper leftCellWrapper1 in wrappersForExtent)
            {
                foreach (LeftCellWrapper leftCellWrapper2 in wrappersForExtent.Skip <LeftCellWrapper>(++num))
                {
                    FragmentQuery rightFragmentQuery1 = this.CreateRightFragmentQuery(leftCellWrapper1);
                    FragmentQuery rightFragmentQuery2 = this.CreateRightFragmentQuery(leftCellWrapper2);
                    bool          flag1 = this.CompareS(ErrorPatternMatcher.ComparisonOP.IsDisjointFrom, this.m_viewgenContext, leftCellWrapper1, leftCellWrapper2, rightFragmentQuery1, rightFragmentQuery2);
                    bool          flag2 = this.CompareC(ErrorPatternMatcher.ComparisonOP.IsDisjointFrom, this.m_viewgenContext, leftCellWrapper1, leftCellWrapper2, rightFragmentQuery1, rightFragmentQuery2);
                    bool          flag3;
                    bool          flag4;
                    if (flag1)
                    {
                        if (!flag2)
                        {
                            flag3 = this.CompareC(ErrorPatternMatcher.ComparisonOP.IsContainedIn, this.m_viewgenContext, leftCellWrapper1, leftCellWrapper2, rightFragmentQuery1, rightFragmentQuery2);
                            flag4 = this.CompareC(ErrorPatternMatcher.ComparisonOP.IsContainedIn, this.m_viewgenContext, leftCellWrapper2, leftCellWrapper1, rightFragmentQuery2, rightFragmentQuery1);
                            bool          flag5         = flag3 && flag4;
                            StringBuilder stringBuilder = new StringBuilder();
                            if (flag5)
                            {
                                stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Disj_Eq);
                            }
                            else if (flag3 || flag4)
                            {
                                if (this.CSideHasDifferentEntitySets(leftCellWrapper1, leftCellWrapper2))
                                {
                                    stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Disj_Subs_Ref);
                                }
                                else
                                {
                                    stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Disj_Subs);
                                }
                            }
                            else
                            {
                                stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Disj_Unk);
                            }
                            this.m_errorLog.AddEntry(new ErrorLog.Record(ViewGenErrorCode.ErrorPatternInvalidPartitionError, stringBuilder.ToString(), ErrorPatternMatcher.ToIEnum(leftCellWrapper1.OnlyInputCell, leftCellWrapper2.OnlyInputCell), ""));
                            if (this.FoundTooManyErrors())
                            {
                                return;
                            }
                        }
                        else
                        {
                            continue;
                        }
                    }
                    else
                    {
                        flag3 = this.CompareC(ErrorPatternMatcher.ComparisonOP.IsContainedIn, this.m_viewgenContext, leftCellWrapper1, leftCellWrapper2, rightFragmentQuery1, rightFragmentQuery2);
                        flag4 = this.CompareC(ErrorPatternMatcher.ComparisonOP.IsContainedIn, this.m_viewgenContext, leftCellWrapper2, leftCellWrapper1, rightFragmentQuery2, rightFragmentQuery1);
                    }
                    bool flag6 = this.CompareS(ErrorPatternMatcher.ComparisonOP.IsContainedIn, this.m_viewgenContext, leftCellWrapper1, leftCellWrapper2, rightFragmentQuery1, rightFragmentQuery2);
                    bool flag7 = this.CompareS(ErrorPatternMatcher.ComparisonOP.IsContainedIn, this.m_viewgenContext, leftCellWrapper2, leftCellWrapper1, rightFragmentQuery2, rightFragmentQuery1);
                    bool flag8 = flag3 && flag4;
                    if (flag6 && flag7)
                    {
                        if (!flag8)
                        {
                            StringBuilder stringBuilder = new StringBuilder();
                            if (flag2)
                            {
                                stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Eq_Disj);
                            }
                            else if (flag3 || flag4)
                            {
                                if (this.CSideHasDifferentEntitySets(leftCellWrapper1, leftCellWrapper2))
                                {
                                    stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Eq_Subs_Ref);
                                }
                                else
                                {
                                    if (leftCellWrapper1.LeftExtent.Equals((object)leftCellWrapper2.LeftExtent))
                                    {
                                        bool           hasCondition1;
                                        List <EdmType> edmTypes1;
                                        ErrorPatternMatcher.GetTypesAndConditionForWrapper(leftCellWrapper1, out hasCondition1, out edmTypes1);
                                        bool           hasCondition2;
                                        List <EdmType> edmTypes2;
                                        ErrorPatternMatcher.GetTypesAndConditionForWrapper(leftCellWrapper2, out hasCondition2, out edmTypes2);
                                        if (!hasCondition1 && !hasCondition2 && (edmTypes1.Except <EdmType>((IEnumerable <EdmType>)edmTypes2).Count <EdmType>() != 0 || edmTypes2.Except <EdmType>((IEnumerable <EdmType>)edmTypes1).Count <EdmType>() != 0) && (!ErrorPatternMatcher.CheckForStoreConditions(leftCellWrapper1) || !ErrorPatternMatcher.CheckForStoreConditions(leftCellWrapper2)))
                                        {
                                            this.m_errorLog.AddEntry(new ErrorLog.Record(ViewGenErrorCode.ErrorPatternConditionError, Strings.Viewgen_ErrorPattern_Partition_MultipleTypesMappedToSameTable_WithoutCondition((object)StringUtil.ToCommaSeparatedString((IEnumerable)edmTypes1.Select <EdmType, string>((Func <EdmType, string>)(it => it.FullName)).Union <string>(edmTypes2.Select <EdmType, string>((Func <EdmType, string>)(it => it.FullName)))), (object)leftCellWrapper1.LeftExtent), ErrorPatternMatcher.ToIEnum(leftCellWrapper1.OnlyInputCell, leftCellWrapper2.OnlyInputCell), ""));
                                            return;
                                        }
                                    }
                                    stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Eq_Subs);
                                }
                            }
                            else if (!this.IsQueryView() && (leftCellWrapper1.OnlyInputCell.CQuery.Extent is AssociationSet || leftCellWrapper2.OnlyInputCell.CQuery.Extent is AssociationSet))
                            {
                                stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Eq_Unk_Association);
                            }
                            else
                            {
                                stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Eq_Unk);
                            }
                            this.m_errorLog.AddEntry(new ErrorLog.Record(ViewGenErrorCode.ErrorPatternInvalidPartitionError, stringBuilder.ToString(), ErrorPatternMatcher.ToIEnum(leftCellWrapper1.OnlyInputCell, leftCellWrapper2.OnlyInputCell), ""));
                            if (this.FoundTooManyErrors())
                            {
                                return;
                            }
                        }
                    }
                    else if ((flag6 || flag7) && (!flag6 || !flag3 || flag4) && (!flag7 || !flag4 || flag3))
                    {
                        StringBuilder stringBuilder = new StringBuilder();
                        if (flag2)
                        {
                            stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Sub_Disj);
                        }
                        else if (flag8)
                        {
                            if (this.CSideHasDifferentEntitySets(leftCellWrapper1, leftCellWrapper2))
                            {
                                stringBuilder.Append(" " + Strings.Viewgen_ErrorPattern_Partition_Sub_Eq_Ref);
                            }
                            else
                            {
                                stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Sub_Eq);
                            }
                        }
                        else
                        {
                            stringBuilder.Append(Strings.Viewgen_ErrorPattern_Partition_Sub_Unk);
                        }
                        this.m_errorLog.AddEntry(new ErrorLog.Record(ViewGenErrorCode.ErrorPatternInvalidPartitionError, stringBuilder.ToString(), ErrorPatternMatcher.ToIEnum(leftCellWrapper1.OnlyInputCell, leftCellWrapper2.OnlyInputCell), ""));
                        if (this.FoundTooManyErrors())
                        {
                            return;
                        }
                    }
                }
            }
        }
        private void MatchConditionErrors()
        {
            List <LeftCellWrapper> wrappersForExtent             = this.m_viewgenContext.AllWrappersForExtent;
            Set <MemberPath>       mappedConditionMembers        = new Set <MemberPath>();
            Set <Dictionary <MemberPath, Set <Constant> > > set1 = new Set <Dictionary <MemberPath, Set <Constant> > >((IEqualityComparer <Dictionary <MemberPath, Set <Constant> > >) new ConditionComparer());
            Dictionary <Dictionary <MemberPath, Set <Constant> >, LeftCellWrapper> dictionary = new Dictionary <Dictionary <MemberPath, Set <Constant> >, LeftCellWrapper>((IEqualityComparer <Dictionary <MemberPath, Set <Constant> > >) new ConditionComparer());

            foreach (LeftCellWrapper leftCellWrapper in wrappersForExtent)
            {
                Dictionary <MemberPath, Set <Constant> > index = new Dictionary <MemberPath, Set <Constant> >();
                foreach (MemberRestriction memberRestriction in leftCellWrapper.OnlyInputCell.GetLeftQuery(this.m_viewgenContext.ViewTarget).GetConjunctsFromWhereClause())
                {
                    MemberPath memberPath = memberRestriction.RestrictedMemberSlot.MemberPath;
                    if (this.m_domainMap.IsConditionMember(memberPath))
                    {
                        ScalarRestriction scalarRestriction = memberRestriction as ScalarRestriction;
                        if (scalarRestriction != null && !mappedConditionMembers.Contains(memberPath) && (!leftCellWrapper.OnlyInputCell.CQuery.WhereClause.Equals((object)leftCellWrapper.OnlyInputCell.SQuery.WhereClause) && !ErrorPatternMatcher.IsMemberPartOfNotNullCondition((IEnumerable <LeftCellWrapper>)wrappersForExtent, memberPath, this.m_viewgenContext.ViewTarget)))
                        {
                            this.CheckThatConditionMemberIsNotMapped(memberPath, wrappersForExtent, mappedConditionMembers);
                        }
                        if (this.m_viewgenContext.ViewTarget == ViewTarget.UpdateView && scalarRestriction != null && memberPath.IsNullable)
                        {
                            if (ErrorPatternMatcher.IsMemberPartOfNotNullCondition((IEnumerable <LeftCellWrapper>) new LeftCellWrapper[1]
                            {
                                leftCellWrapper
                            }, memberPath, this.m_viewgenContext.ViewTarget))
                            {
                                MemberPath rightMemberPath = ErrorPatternMatcher.GetRightMemberPath(memberPath, leftCellWrapper);
                                if (rightMemberPath != null && rightMemberPath.IsNullable)
                                {
                                    if (!ErrorPatternMatcher.IsMemberPartOfNotNullCondition((IEnumerable <LeftCellWrapper>) new LeftCellWrapper[1]
                                    {
                                        leftCellWrapper
                                    }, rightMemberPath, this.m_viewgenContext.ViewTarget))
                                    {
                                        this.m_errorLog.AddEntry(new ErrorLog.Record(ViewGenErrorCode.ErrorPatternConditionError, Strings.Viewgen_ErrorPattern_NotNullConditionMappedToNullableMember((object)memberPath, (object)rightMemberPath), leftCellWrapper.OnlyInputCell, ""));
                                    }
                                }
                            }
                        }
                        foreach (Constant element in memberRestriction.Domain.Values)
                        {
                            Set <Constant> set2;
                            if (!index.TryGetValue(memberPath, out set2))
                            {
                                set2 = new Set <Constant>(Constant.EqualityComparer);
                                index.Add(memberPath, set2);
                            }
                            set2.Add(element);
                        }
                    }
                }
                if (index.Count > 0)
                {
                    if (set1.Contains(index))
                    {
                        if (!this.RightSideEqual(dictionary[index], leftCellWrapper))
                        {
                            this.m_errorLog.AddEntry(new ErrorLog.Record(ViewGenErrorCode.ErrorPatternConditionError, Strings.Viewgen_ErrorPattern_DuplicateConditionValue((object)ErrorPatternMatcher.BuildCommaSeparatedErrorString <MemberPath>((IEnumerable <MemberPath>)index.Keys)), ErrorPatternMatcher.ToIEnum(dictionary[index].OnlyInputCell, leftCellWrapper.OnlyInputCell), ""));
                        }
                    }
                    else
                    {
                        set1.Add(index);
                        dictionary.Add(index, leftCellWrapper);
                    }
                }
            }
        }