Ejemplo n.º 1
0
        async public Task <IExplorerObject> CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

            MapServerExplorerObjects obj = new MapServerExplorerObjects();
            var childObjects             = await obj.ChildObjects();

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

            foreach (IExplorerObject exObject in childObjects)
            {
                if (exObject.FullName == FullName)
                {
                    cache.Append(exObject);
                    return(exObject);
                }
            }
            return(null);
        }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 3
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);
        }