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

            ArcIMSExplorerObjects group = new ArcIMSExplorerObjects();

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

            group = (ArcIMSExplorerObjects)((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);
        }
Example #2
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));
        }
Example #3
0
        public IExplorerObject CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache)
        {
            if (cache.Contains(FullName))
            {
                return(cache[FullName]);
            }

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