コード例 #1
0
        protected int ReportError([NotNull] string description,
                                  [NotNull] ITable table,
                                  [CanBeNull] IssueCode issueCode,
                                  [CanBeNull] string affectedComponent,
                                  [CanBeNull] IEnumerable <object> values = null)
        {
            var involvedRows = new List <InvolvedRow> {
                CreateInvolvedRowForTable(table)
            };

            const IGeometry geometry = null;
            var             qaError  = new QaError(this, description, involvedRows, geometry,
                                                   issueCode, affectedComponent,
                                                   values: values);

            var args = new QaErrorEventArgs(qaError);

            PostProcessError?.Invoke(this, args);
            if (args.Cancel)
            {
                return(0);
            }

            OnQaError(args);

            return(1);
        }
コード例 #2
0
        protected int ReportError([NotNull] string description,
                                  [CanBeNull] IGeometry errorGeometry,
                                  [CanBeNull] IssueCode issueCode,
                                  [CanBeNull] string affectedComponent,
                                  [NotNull] IEnumerable <InvolvedRow> involvedRows,
                                  [CanBeNull] IEnumerable <object> values = null)
        {
            var args = new QaErrorEventArgs(new QaError(this, description, involvedRows,
                                                        errorGeometry,
                                                        issueCode, affectedComponent,
                                                        values: values));

            PostProcessError?.Invoke(this, args);
            if (args.Cancel)
            {
                return(0);
            }

            OnQaError(args);
            return(1);
        }
コード例 #3
0
            protected sealed override void ValidateError(object sender, QaErrorEventArgs args)
            {
                if (args.QaError.Geometry != null)
                {
                    EnsureFilter();
                    _filter.Geometry = args.QaError.Geometry;
                    foreach (IRow row in Test.Search((ITable)FeatureClass, _filter, _helper))
                    {
                        if (!(row is IFeature f))
                        {
                            continue;
                        }

                        if (((IRelationalOperator2)f.Shape).ContainsEx(
                                args.QaError.Geometry,
                                esriSpatialRelationExEnum.esriSpatialRelationExBoundary))
                        {
                            args.Cancel = true;
                            return;
                        }
                    }
                }
            }
コード例 #4
0
 protected abstract void ValidateError(object sender, QaErrorEventArgs args);
コード例 #5
0
 private void OnQaError([NotNull] QaErrorEventArgs args)
 {
     QaError?.Invoke(this, args);
 }