Esempio n. 1
0
        async public Task <int> CountFeatures()
        {
            if (_fc == null)
            {
                return(0);
            }

            return(await _fc.CountFeatures());
        }
Esempio n. 2
0
            async static public Task <FeatureClassImportProgressReporter> CreateAsync(object import, IFeatureClass source)
            {
                var reporter = new FeatureClassImportProgressReporter();

                if (import == null)
                {
                    return(null);
                }

                if (import is FDBImport)
                {
                    reporter._cancelTracker = ((FDBImport)import).CancelTracker;

                    if (source != null)
                    {
                        reporter._report.featureMax = await source.CountFeatures();
                    }
                    ((FDBImport)import).ReportAction   += new FDBImport.ReportActionEvent(reporter.FeatureClassImportProgressReporter_ReportAction);
                    ((FDBImport)import).ReportProgress += new FDBImport.ReportProgressEvent(reporter.FeatureClassImportProgressReporter_ReportProgress);
                    ((FDBImport)import).ReportRequest  += new FDBImport.ReportRequestEvent(reporter.FeatureClassImportProgressReporter_ReportRequest);
                }
                if (import is FeatureImport)
                {
                    reporter._cancelTracker = ((FeatureImport)import).CancelTracker;

                    if (source != null)
                    {
                        reporter._report.featureMax = await source.CountFeatures();
                    }
                    ((FeatureImport)import).ReportAction   += new FeatureImport.ReportActionEvent(reporter.import_ReportAction);
                    ((FeatureImport)import).ReportProgress += new FeatureImport.ReportProgressEvent(reporter.import_ReportProgress);
                    ((FeatureImport)import).ReportRequest  += new FeatureImport.ReportRequestEvent(reporter.import_ReportRequest);
                }

                return(reporter);
            }
Esempio n. 3
0
        async public Task <int> CountFeatures()
        {
            int c = 0;

            if (_edgeFcs != null)
            {
                foreach (IFeatureClass edgeFc in _edgeFcs.Values)
                {
                    if (edgeFc != null)
                    {
                        c += await edgeFc.CountFeatures();
                    }
                }
            }
            if (_nodeFc != null)
            {
                c += await _nodeFc.CountFeatures();
            }
            return(c);
        }
Esempio n. 4
0
 async public Task <int> CountFeatures()
 {
     return(_fc != null ? await _fc.CountFeatures() : 0);
 }