public VectorTileCacheLayerExplorerObject(VectorTileCacheDatasetExplorerObject parent, IDatasetElement element) : base(parent, typeof(FeatureClass), 1) { if (element == null) { return; } _parent = parent; _fcname = element.Title; if (element.Class is IFeatureClass) { _fc = (IFeatureClass)element.Class; } }
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[] parts = FullName.Split('\\'); if (parts.Length != 3) { return(null); } var parent = new VectorTileCacheDatasetExplorerObject(); parent = await parent.CreateInstanceByFullName(parts[0] + @"\" + parts[1], cache) as VectorTileCacheDatasetExplorerObject; if (parent == null) { return(null); } var childObjects = await parent.ChildObjects(); if (childObjects != null) { foreach (IExplorerObject exObject in childObjects) { if (exObject.Name == parts[2]) { cache.Append(exObject); return(exObject); } } } return(null); }