示例#1
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            return(null);
            //if (cache.Contains(FullName)) return cache[FullName];

            //FullName = FullName.Replace("/", @"\");
            //int lastIndex = FullName.LastIndexOf(@"\");
            //if (lastIndex == -1) return null;

            //string dsName = FullName.Substring(0, lastIndex);
            //string fcName = FullName.Substring(lastIndex + 1, FullName.Length - lastIndex - 1);

            //AccessFDBDatasetExplorerObject dsObject = new AccessFDBDatasetExplorerObject();
            //dsObject = (AccessFDBDatasetExplorerObject)dsObject.CreateInstanceByFullName(dsName, cache);
            //if (dsObject == null || dsObject.ChildObjects == null) return null;

            //foreach (IExplorerObject exObject in dsObject.ChildObjects)
            //{
            //    if (exObject.Name == fcName)
            //    {
            //        cache.Append(exObject);
            //        return exObject;
            //    }
            //}
            //return null;
        }
示例#2
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            try
            {
                FileInfo fi = new FileInfo(FullName);
                if (!fi.Exists)
                {
                    return(null);
                }

                RasterPyramidExplorerObject rObject = new RasterPyramidExplorerObject(null, FullName);
                if (rObject.Object is IRasterClass)
                {
                    cache.Append(rObject);
                    return(rObject);
                }
                return(null);
            }
            catch
            {
                return(null);
            }
        }
示例#3
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            FullName = FullName.Replace("/", @"\");
            int lastIndex = FullName.IndexOf(@"\"); // FullName.LastIndexOf(@"\");

            if (lastIndex == -1)
            {
                return(null);
            }

            string dsName = FullName.Substring(lastIndex + 1, FullName.Length - lastIndex - 1);

            SdeExplorerGroupObject groupObject = new SdeExplorerGroupObject();

            if (groupObject.ChildObjects == null)
            {
                return(null);
            }

            foreach (IExplorerObject exObject in groupObject.ChildObjects)
            {
                if (exObject.Name == dsName)
                {
                    cache.Append(exObject);
                    return(exObject);
                }
            }
            return(null);
        }
示例#4
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            IExplorerObject obj = (cache.Contains(FullName)) ? cache[FullName] : CreateInstance(null, FullName);

            cache.Append(obj);
            return(obj);
        }
示例#5
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            OgrDatasetGroupObject group = new OgrDatasetGroupObject();

            if (FullName.IndexOf(group.FullName) != 0 || FullName.Length < group.FullName.Length + 2)
            {
                return(null);
            }

            group = (OgrDatasetGroupObject)((cache.Contains(group.FullName)) ? cache[group.FullName] : group);

            foreach (IExplorerObject exObject in group.ChildObjects)
            {
                if (exObject.FullName == FullName)
                {
                    cache.Append(exObject);
                    return(exObject);
                }
            }
            return(null);
        }
示例#6
0
 public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
 {
     if (cache.Contains(FullName))
     {
         return(cache[FullName]);
     }
     return(null);
 }
示例#7
0
        public Task <IExplorerObject> CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (FullName == String.Empty)
            {
                return(Task.FromResult <IExplorerObject>(new ComputerObject(_application)));
            }

            return(Task.FromResult <IExplorerObject>(null));
        }
示例#8
0
        public Task <IExplorerObject> CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(Task.FromResult <IExplorerObject>(cache[FullName]));
            }

            return(Task.FromResult <IExplorerObject>(null));
        }
示例#9
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (FullName == String.Empty)
            {
                return(new ComputerObject(_application));
            }

            return(null);
        }
示例#10
0
        public Task <IExplorerObject> CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(Task.FromResult(cache[FullName]));
            }

            if (FullName == this.FullName)
            {
                ArcIMSExplorerObjects exObject = new ArcIMSExplorerObjects();
                cache.Append(exObject);
                return(Task.FromResult <IExplorerObject>(exObject));
            }
            return(Task.FromResult <IExplorerObject>(null));
        }
示例#11
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            if (FullName == this.FullName)
            {
                SdeExplorerGroupObject exObject = new SdeExplorerGroupObject();
                cache.Append(exObject);
                return(exObject);
            }
            return(null);
        }
示例#12
0
        public Task <IExplorerObject> CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(Task.FromResult <IExplorerObject>(cache[FullName]));
            }

            if (FullName == this.FullName)
            {
                MapServerExplorerObjects obj = new MapServerExplorerObjects();
                cache.Append(obj);
                return(Task.FromResult <IExplorerObject>(obj));
            }

            return(Task.FromResult <IExplorerObject>(null));
        }
示例#13
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            if (FullName == this.FullName)
            {
                MapServerExplorerObjects obj = new MapServerExplorerObjects();
                cache.Append(obj);
                return(obj);
            }

            return(null);
        }
示例#14
0
        public Task <IExplorerObject> CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(Task.FromResult <IExplorerObject>(cache[FullName]));
            }

            if (this.FullName == FullName)
            {
                EventTableGroupObject exObject = new EventTableGroupObject();
                cache.Append(exObject);
                return(Task.FromResult <IExplorerObject>(exObject));
            }

            return(Task.FromResult <IExplorerObject>(null));
        }
示例#15
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            if (this.FullName == FullName)
            {
                MsSql2008SpatialGeographyExplorerGroupObject exObject = new MsSql2008SpatialGeographyExplorerGroupObject();
                cache.Append(exObject);
                return(exObject);
            }

            return(null);
        }
示例#16
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);
            }
        }
示例#17
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            FullName = FullName.Replace("/", @"\");
            int lastIndex = FullName.LastIndexOf(@"\");

            if (lastIndex == -1)
            {
                return(null);
            }

            string [] parts = FullName.Split('\\');
            if (parts.Length != 3)
            {
                return(null);
            }
            OgrDatasetExplorerObject parent = new OgrDatasetExplorerObject();

            parent = parent.CreateInstanceByFullName(parts[0] + @"\" + parts[1], cache) as OgrDatasetExplorerObject;
            if (parent == null)
            {
                return(null);
            }

            foreach (IExplorerObject exObject in parent.ChildObjects)
            {
                if (exObject.Name == parts[2])
                {
                    cache.Append(exObject);
                    return(exObject);
                }
            }
            return(null);
        }
示例#18
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            try
            {
                if (cache.Contains(FullName))
                {
                    return(cache[FullName]);
                }
                FileInfo fi = new FileInfo(FullName);
                if (!fi.Exists || fi.Extension.ToLower() != ".mxl")
                {
                    return(null);
                }

                MapDocumentExplorerObject ex = new MapDocumentExplorerObject(null, FullName);
                cache.Append(ex);
                return(ex);
            }
            catch
            {
                return(null);
            }
        }
示例#19
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            EventTableGroupObject group = new EventTableGroupObject();

            if (FullName.StartsWith(group.FullName))
            {
                foreach (IExplorerObject exObject in group.ChildObjects)
                {
                    if (exObject.FullName == FullName)
                    {
                        cache.Append(exObject);
                        return(exObject);
                    }
                }
            }

            return(null);
        }
示例#20
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            FullName = FullName.Replace("/", @"\");
            int lastIndex = FullName.LastIndexOf(@"\");

            if (lastIndex == -1)
            {
                return(null);
            }

            string mapName = FullName.Substring(0, lastIndex);
            string mflName = FullName.Substring(lastIndex + 1, FullName.Length - lastIndex - 1);

            MapExplorerObject mapObject = new MapExplorerObject();

            mapObject = mapObject.CreateInstanceByFullName(mapName, cache) as MapExplorerObject;
            if (mapObject == null || mapObject.ChildObjects == null)
            {
                return(null);
            }

            foreach (FeatureLayerExplorerObject mflObject in mapObject.ChildObjects)
            {
                if (mflObject.Name == mflName)
                {
                    cache.Append(mflObject);
                    return(mflObject);
                }
            }
            return(null);
        }
示例#21
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            MapServerExplorerObjects obj = new MapServerExplorerObjects();

            if (obj.ChildObjects == null)
            {
                return(null);
            }

            foreach (IExplorerObject exObject in obj.ChildObjects)
            {
                if (exObject.FullName == FullName)
                {
                    cache.Append(exObject);
                    return(exObject);
                }
            }
            return(null);
        }
示例#22
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            try
            {
                DirectoryInfo di = new DirectoryInfo(FullName);
                if (!di.Exists)
                {
                    return(null);
                }

                DirectoryObject dObject = new DirectoryObject(this, FullName);
                cache.Append(dObject);
                return(dObject);
            }
            catch
            {
                return(null);
            }
        }
示例#23
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            FullName = FullName.Replace("/", @"\");
            int lastIndex = FullName.LastIndexOf(@"\");

            if (lastIndex == -1)
            {
                return(null);
            }

            string cnName = FullName.Substring(0, lastIndex);
            string svName = FullName.Substring(lastIndex + 1, FullName.Length - lastIndex - 1);

            WMSExplorerObject cnObject = new WMSExplorerObject(this);

            cnObject = cnObject.CreateInstanceByFullName(cnName, cache) as WMSExplorerObject;
            if (cnObject == null || cnObject.ChildObjects == null)
            {
                return(null);
            }

            foreach (IExplorerObject exObject in cnObject.ChildObjects)
            {
                if (exObject.Name == svName)
                {
                    cache.Append(exObject);
                    return(exObject);
                }
            }
            return(null);
        }
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            FullName = FullName.Replace("/", @"\");
            int lastIndex = FullName.LastIndexOf(@"\");

            if (lastIndex == -1)
            {
                return(null);
            }

            string mdbName = FullName.Substring(0, lastIndex);
            string dsName  = FullName.Substring(lastIndex + 1, FullName.Length - lastIndex - 1);

            AccessFDBExplorerObject fdbObject = new AccessFDBExplorerObject();

            fdbObject = (AccessFDBExplorerObject)fdbObject.CreateInstanceByFullName(mdbName, cache);
            if (fdbObject == null || fdbObject.ChildObjects == null)
            {
                return(null);
            }

            foreach (IExplorerObject exObject in fdbObject.ChildObjects)
            {
                if (exObject.Name == dsName)
                {
                    cache.Append(exObject);
                    return(exObject);
                }
            }
            return(null);
        }
示例#25
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            FullName = FullName.Replace("/", @"\");
            int lastIndex = FullName.LastIndexOf(@"\");

            if (lastIndex == -1)
            {
                return(null);
            }

            string cnName = FullName.Substring(0, lastIndex);
            string svName = FullName.Substring(lastIndex + 1, FullName.Length - lastIndex - 1);

            MapServerConnectionExplorerObject pObj = new MapServerConnectionExplorerObject(null);

            pObj = pObj.CreateInstanceByFullName(cnName) as MapServerConnectionExplorerObject;
            if (pObj == null || pObj.ChildObjects == null)
            {
                return(null);
            }

            foreach (IExplorerObject exObject in pObj.ChildObjects)
            {
                if (exObject.Name == svName)
                {
                    cache.Append(exObject);
                    return(exObject);
                }
            }
            return(null);
        }
示例#26
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            FullName = FullName.Replace("/", @"\");
            int lastIndex = FullName.LastIndexOf(@"\");

            if (lastIndex == -1)
            {
                return(null);
            }

            string dsName = FullName.Substring(0, lastIndex);
            string fcName = FullName.Substring(lastIndex + 1, FullName.Length - lastIndex - 1);

            OracleExplorerObject dsObject = new OracleExplorerObject();

            dsObject = dsObject.CreateInstanceByFullName(dsName, cache) as OracleExplorerObject;
            if (dsObject == null || dsObject.ChildObjects == null)
            {
                return(null);
            }

            foreach (IExplorerObject exObject in dsObject.ChildObjects)
            {
                if (exObject.Name == fcName)
                {
                    cache.Append(exObject);
                    return(exObject);
                }
            }
            return(null);
        }
示例#27
0
        async public Task <IExplorerObject> CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            FullName = FullName.Replace("/", @"\");
            int lastIndex = FullName.LastIndexOf(@"\");

            if (lastIndex == -1)
            {
                return(null);
            }

            string dsName = FullName.Substring(0, lastIndex);
            string fcName = FullName.Substring(lastIndex + 1, FullName.Length - lastIndex - 1);

            MsSql2008SpatialSdeExplorerObject dsObject = new MsSql2008SpatialSdeExplorerObject();

            dsObject = await dsObject.CreateInstanceByFullName(dsName, cache) as MsSql2008SpatialSdeExplorerObject;

            if (dsObject == null || await dsObject.ChildObjects() == null)
            {
                return(null);
            }

            foreach (IExplorerObject exObject in await dsObject.ChildObjects())
            {
                if (exObject.Name == fcName)
                {
                    cache.Append(exObject);
                    return(exObject);
                }
            }
            return(null);
        }
示例#28
0
 public Task <IExplorerObject> CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
 {
     return(Task.FromResult <IExplorerObject>(null));
 }
示例#29
0
 public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
 {
     return(null);
 }
示例#30
0
        async public Task <IExplorerObject> CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            GeoJsonServiceGroupObject group = new GeoJsonServiceGroupObject();

            if (FullName.IndexOf(group.FullName) != 0 || FullName.Length < group.FullName.Length + 2)
            {
                return(null);
            }

            group = (GeoJsonServiceGroupObject)((cache.Contains(group.FullName)) ? cache[group.FullName] : group);

            foreach (IExplorerObject exObject in await group.ChildObjects())
            {
                if (exObject.FullName == FullName)
                {
                    cache.Append(exObject);
                    return(exObject);
                }
            }
            return(null);
        }