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); }
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)); }
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); }