Ejemplo n.º 1
0
        protected override int FindErrors(IRow row1, int tableIndex1,
                                          IRow row2, int tableIndex2)
        {
            if (_relevantRelationCondition == null)
            {
                _relevantRelationCondition = new RelevantRowPairCondition(
                    _relevantRelationConditionSql,
                    GetSqlCaseSensitivity());
            }

            if (!_relevantRelationCondition.IsFulfilled(row1, tableIndex1,
                                                        row2, tableIndex2))
            {
                return(NoError);
            }

            if (_zDifferenceStrategy == null)
            {
                _zDifferenceStrategy = ZDifferenceStrategyFactory.CreateStrategy(
                    _zComparisonMethod,
                    _minimumZDifference, _minimumZDifferenceExpressionSql,
                    _maximumZDifference, _maximumZDifferenceExpressionSql,
                    _zRelationConstraint,
                    GetSqlCaseSensitivity(),
                    FormatComparison, this,
                    index => UseDistanceFromReferenceRingPlane &&
                    IsInFromTableList(index),
                    ReferenceRingPlaneCoplanarityTolerance,
                    IgnoreNonCoplanarReferenceRings);
            }

            return(_zDifferenceStrategy.ReportErrors(row1, tableIndex1,
                                                     row2, tableIndex2));
        }
Ejemplo n.º 2
0
        protected override int FindErrors(IRow row1, int tableIndex1,
                                          IRow row2, int tableIndex2)
        {
            if (_zDifferenceStrategy == null)
            {
                _zDifferenceStrategy = ZDifferenceStrategyFactory.CreateStrategy(
                    _zComparisonMethod,
                    _minimumZDifference, _maximumZDifferenceExpressionSql,
                    _maximumZDifference, _maximumZDifferenceExpressionSql,
                    _zRelationConstraint, GetSqlCaseSensitivity(),
                    FormatComparison, this);
            }

            return(_zDifferenceStrategy.ReportErrors(row1, tableIndex1,
                                                     row2, tableIndex2));
        }