예제 #1
0
 public StackOverflowSearchItemResult(string name, string description, string url, IVsUIObject icon, IVsSearchProvider provider)
 {
     DisplayText     = name;
     Url             = url;
     Description     = description;
     Icon            = icon;
     PersistenceData = name + "|" + url + "|" + description;
     SearchProvider  = provider;
 }
 public StackOverflowSearchItemResult(string name, string description, string url, IVsUIObject icon, IVsSearchProvider provider)
 {
     DisplayText = name;
     Url = url;
     Icon = icon;
     PersistenceData = name + "|" + Url;
     Description = description;
     SearchProvider = provider;
 }
예제 #3
0
        public SearchResult(
            IVsSearchProvider searchProvider,
            IExtensionDataItemView item)
        {
            // If either of these are null, we end up with very hard to trace exceptions that
            // in Visual Studio that don't really describe the issue. To save us future headaches..
            Debug.Assert(searchProvider != null);
            Debug.Assert(item != null);

            this.SearchProvider = searchProvider;
            this.item           = item;
        }
예제 #4
0
 // TODO: refactor this class as needed to population with extension gallery results.
 public SearchResult(
     IVsSearchProvider searchProvider,
     string displayText,
     string description,
     string tooltip,
     Action invokeAction)
 {
     this.SearchProvider = searchProvider;
     this.DisplayText    = displayText;
     this.Description    = description;
     this.Tooltip        = tooltip;
     this.invokeAction   = invokeAction;
 }
예제 #5
0
 public VSSearchResult(VSSearchableItem item, IVsSearchProvider provider)
 {
     this.Item = item;
     this.Provider = provider;
 }
예제 #6
0
        public static IVsSearchItemResult CreateItemResult(string lpszPersistenceData, IList<VSSearchableItem> items, IVsSearchProvider provider)
        {
            foreach (var item in items)
            {
                // Try to match the name, that we reported as persistence string
                if (item.Name.Equals(lpszPersistenceData, StringComparison.Ordinal))
                {
                    // Create a new item. The item creation must be a fast operation (e.g. should not make network requests)
                    return new VSSearchResult(item, provider);
                }
            }

            // We got called with an item that we cannot recreate, return null
            return null;
        }
예제 #7
0
        public static IVsSearchItemResult CreateItemResult(string lpszPersistenceData, WorkItem[] items, IVsSearchProvider provider)
        {
            foreach (var item in items)
            {
                // Try to match the name, that we reported as persistence string
                if (item.Id.ToString().Equals(lpszPersistenceData, StringComparison.Ordinal))
                {
                    // Create a new item. The item creation must be a fast operation (e.g. should not make network requests)
                    return(new WorkItemSearchResult(item, provider));
                }
            }

            // We got called with an item that we cannot recreate, return null
            return(null);
        }
예제 #8
0
 public WorkItemSearchResult(WorkItem item, IVsSearchProvider provider)
 {
     this.item     = item;
     this.provider = provider;
 }
예제 #9
0
 public WorkItemSearchTask(WorkItemStore store, IVsSearchProvider provider, uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     this.store     = store;
     searchProvider = provider;
 }
예제 #10
0
 public QuickLaunchItemsSource(IVsSearchProvider searchProvider)
 {
     this.searchProvider = searchProvider
                           ?? throw new ArgumentNullException(nameof(searchProvider));
 }