public IEnumerable <NamespaceInfo> SearchNamespace(string namespaceName) { IEnumerable <NamespaceInfo> result = null; var localIndex = _indexFactory.GetLocalIndex(createIfNotExists: true); if (localIndex != null) { result = localIndex.GetNamespaces(namespaceName); } if (result == null) { var remoteIndex = _indexFactory.GetRemoteIndex(); if (remoteIndex != null) { result = remoteIndex.GetNamespaces(namespaceName); } } return(result); }
public IEnumerable <TypeInfo> Search(string typeName) { IEnumerable <TypeInfo> result = null; var localIndex = _indexFactory.GetLocalIndex(); if (localIndex != null) { result = localIndex.GetTypes(typeName); } if (result == null) { var remoteIndex = _indexFactory.GetRemoteIndex(); if (remoteIndex != null) { result = remoteIndex.GetTypes(typeName); } } return(result); }