예제 #1
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);
        }
예제 #2
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);
        }