private IList <IRow> GetRowsByRelatedGeometry(
            [NotNull] ITable table,
            [NotNull] IObjectDataset objectDataset,
            [NotNull] ITest testWithTable,
            [NotNull] IEnumerable <IList <IRelationshipClass> > relClassChains)
        {
            Assert.ArgumentNotNull(table, nameof(table));
            Assert.ArgumentNotNull(objectDataset, nameof(objectDataset));
            Assert.ArgumentNotNull(testWithTable, nameof(testWithTable));

            HashSet <int> oids = ReferenceGeometryUtils.GetOidsByRelatedGeometry(
                table, relClassChains, Assert.NotNull(_testPerimeter), testWithTable);

            // Add oids of selected rows
            if (ObjectSelection != null)
            {
                oids.UnionWith(ObjectSelection.GetSelectedOIDs(objectDataset));
            }

            if (oids.Count == 0)
            {
                return(new List <IRow>());
            }

            return(new List <IRow>(GdbQueryUtils.GetRowsInList(
                                       table, table.OIDFieldName, oids,
                                       recycle: false)));
        }
示例#2
0
        private IEnumerable <IList <IRelationshipClass> > GetRelClassChains(
            [NotNull] ITable table,
            [NotNull] IObjectDataset objectDataset,
            [NotNull] ITest testWithTable,
            out bool hasAnyAssociationsToFeatureClasses)
        {
            Assert.ArgumentNotNull(table, nameof(table));
            Assert.ArgumentNotNull(objectDataset, nameof(objectDataset));
            Assert.ArgumentNotNull(testWithTable, nameof(testWithTable));

            IEnumerable <IList <IRelationshipClass> > relClassChains =
                ReferenceGeometryUtils.GetRelationshipClassChainsToVerifiedFeatureClasses(
                    objectDataset, _verificationContext,
                    _isRelevantVectorDataset, out hasAnyAssociationsToFeatureClasses);

            return(relClassChains);
        }