async public Task <IExplorerObject> CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache) { if (cache.Contains(FullName)) { return(cache[FullName]); } VectorTileCacheGroupExplorerObject group = new VectorTileCacheGroupExplorerObject(); if (FullName.IndexOf(group.FullName) != 0 || FullName.Length < group.FullName.Length + 2) { return(null); } group = (VectorTileCacheGroupExplorerObject)((cache.Contains(group.FullName)) ? cache[group.FullName] : group); var childObjects = await group.ChildObjects(); if (childObjects != null) { foreach (IExplorerObject exObject in childObjects) { if (exObject.FullName == FullName) { cache.Append(exObject); return(exObject); } } } return(null); }
public Task <IExplorerObject> CreateInstanceByFullName(string FullName, ISerializableExplorerObjectCache cache) { if (cache.Contains(FullName)) { return(Task.FromResult <IExplorerObject>(cache[FullName])); } if (this.FullName == FullName) { VectorTileCacheGroupExplorerObject exObject = new VectorTileCacheGroupExplorerObject(); cache.Append(exObject); return(Task.FromResult <IExplorerObject>(exObject)); } return(Task.FromResult <IExplorerObject>(null)); }