Ejemplo n.º 1
0
        internal void SearchRoot(CallHierarchyItem root, string displayName, Action<ICallHierarchyNameItem> verify, CallHierarchySearchScope scope, IImmutableSet<Document> documents = null)
        {
            var callback = new MockSearchCallback(verify);
            var category = root.SupportedSearchCategories.First(c => c.DisplayName == displayName).Name;
            if (documents != null)
            {
                root.StartSearchWithDocuments(category, scope, callback, documents);
            }
            else
            {
                root.StartSearch(category, scope, callback);
            }

            callback.WaitForCompletion();
        }
        internal void SearchRoot(CallHierarchyItem root, string displayName, Action <ICallHierarchyNameItem> verify, CallHierarchySearchScope scope, IImmutableSet <Document> documents = null)
        {
            var callback = new MockSearchCallback(verify);

            // Assert we have the category before we try to find it to give better diagnosing
            Assert.Contains(displayName, root.SupportedSearchCategories.Select(c => c.DisplayName));
            var category = root.SupportedSearchCategories.First(c => c.DisplayName == displayName).Name;

            if (documents != null)
            {
                root.StartSearchWithDocuments(category, scope, callback, documents);
            }
            else
            {
                root.StartSearch(category, scope, callback);
            }

            callback.WaitForCompletion();
        }
Ejemplo n.º 3
0
        internal void SearchRoot(CallHierarchyItem root, string displayName, Action<ICallHierarchyNameItem> verify, CallHierarchySearchScope scope, IImmutableSet<Document> documents = null)
        {
            var callback = new MockSearchCallback(verify);
            var category = root.SupportedSearchCategories.First(c => c.DisplayName == displayName).Name;
            if (documents != null)
            {
                root.StartSearchWithDocuments(category, scope, callback, documents);
            }
            else
            {
                root.StartSearch(category, scope, callback);
            }

            callback.WaitForCompletion();
        }