Пример #1
0
        async public Task <IExplorerFileObject> CreateInstance(IExplorerObject parent, string filename)
        {
            GMLExplorerObject exObject = new GMLExplorerObject(null, filename);

            if (exObject._dataset.State != DatasetState.opened)
            {
                await exObject._dataset.Open();
            }
            return(exObject);
        }
Пример #2
0
        public IExplorerFileObject CreateInstance(IExplorerObject parent, string filename)
        {
            GMLExplorerObject exObject = new GMLExplorerObject(null, filename);

            if (exObject._dataset.State == DatasetState.opened)
            {
                return(new GMLExplorerObject(null, exObject));
            }

            return(null);
        }
Пример #3
0
        public GMLFeatureClassExplorerObject(GMLExplorerObject parent, string fcName)
            : base(parent, typeof(IFeatureClass))
        {
            _parent = parent;
            _fcName = fcName;

            if (this.Dataset != null)
            {
                IDatasetElement element = this.Dataset[fcName];
                if (element != null)
                {
                    _fc = element.Class as IFeatureClass;
                }
            }
        }
Пример #4
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            try
            {
                GMLExplorerObject exObject = new GMLExplorerObject();
                exObject = exObject.CreateInstance(null, FullName) as GMLExplorerObject;
                if (exObject != null)
                {
                    cache.Append(exObject);
                }
                return(exObject);
            }
            catch
            {
                return(null);
            }
        }
Пример #5
0
 internal GMLExplorerObject(IExplorerObject parent, GMLExplorerObject exObject)
     : base(parent, typeof(OGC.Dataset.GML.Dataset))
 {
     _filename = exObject._filename;
     _dataset  = exObject._dataset;
 }
Пример #6
0
 public GMLFeatureClassExplorerObject(GMLExplorerObject parent, string fcName)
     : base(parent, typeof(IFeatureClass), 1)
 {
     _parent = parent;
     _fcName = fcName;
 }