コード例 #1
0
        async public override Task <bool> Refresh()
        {
            await base.Refresh();

            if (_connectionString == null)
            {
                return(false);
            }

            PostGISDataset dataset = new PostGISDataset();
            await dataset.SetConnectionString(_connectionString.ConnectionString);

            await dataset.Open();

            List <IDatasetElement> elements = await dataset.Elements();

            if (elements == null)
            {
                return(false);
            }

            foreach (IDatasetElement element in elements)
            {
                if (element.Class is IFeatureClass)
                {
                    base.AddChildObject(new PostGISFeatureClassExplorerObject(this, element));
                }
            }

            return(true);
        }
コード例 #2
0
        public override void Refresh()
        {
            base.Refresh();
            if (_connectionString == null)
            {
                return;
            }

            PostGISDataset dataset = new PostGISDataset();

            dataset.ConnectionString = _connectionString.ConnectionString;
            dataset.Open();

            List <IDatasetElement> elements = dataset.Elements;

            if (elements == null)
            {
                return;
            }
            foreach (IDatasetElement element in elements)
            {
                if (element.Class is IFeatureClass)
                {
                    base.AddChildObject(new PostGISFeatureClassExplorerObject(this, element));
                }
            }
        }