Ejemplo n.º 1
0
        public VsSearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, ISearchHandler handler, CancellationTokenSource cts) {
            if (pSearchQuery == null) {
                throw new ArgumentNullException(nameof(pSearchQuery));
            }

            if (pSearchCallback == null) {
                throw new ArgumentNullException(nameof(pSearchCallback));
            }

            if (dwCookie == VSConstants.VSCOOKIE_NIL) {
                throw new ArgumentException(nameof(dwCookie));
            }

            if (string.IsNullOrEmpty(pSearchQuery.SearchString)) {
                throw new ArgumentException(nameof(pSearchQuery));
            }

            Id = dwCookie;
            SearchQuery = pSearchQuery;
            ErrorCode = 0;

            _searchCallback = pSearchCallback;
            _handler = handler;
            _cts = cts;
            _taskStatus = (long)Created;
        }
Ejemplo n.º 2
0
 public override IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback) {
     if (SearchEnabled) {
         var grid = Content as VariableView;
         return new VariableSearchTask(grid.RootTreeGrid, dwCookie, pSearchQuery, pSearchCallback);
     }
     return null;
 }
Ejemplo n.º 3
0
        public VsSearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, ISearchHandler handler, CancellationTokenSource cts)
        {
            if (pSearchQuery == null)
            {
                throw new ArgumentNullException(nameof(pSearchQuery));
            }

            if (pSearchCallback == null)
            {
                throw new ArgumentNullException(nameof(pSearchCallback));
            }

            if (dwCookie == VSConstants.VSCOOKIE_NIL)
            {
                throw new ArgumentException(nameof(dwCookie));
            }

            if (string.IsNullOrEmpty(pSearchQuery.SearchString))
            {
                throw new ArgumentException(nameof(pSearchQuery));
            }

            Id          = dwCookie;
            SearchQuery = pSearchQuery;
            ErrorCode   = 0;

            _searchCallback = pSearchCallback;
            _handler        = handler;
            _cts            = cts;
            _taskStatus     = (long)Created;
        }
 public override IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
 {
     if(pSearchQuery == null || pSearchCallback == null)
     {
         return null;
     }
     return new XPathSearchTask(dwCookie, pSearchQuery, pSearchCallback, this);
 }
 internal SearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, DesignerControl designer)
 {
     Designer       = designer;
     Id             = dwCookie;
     SearchQuery    = pSearchQuery;
     SearchCallback = pSearchCallback;
     Status         = (uint)__VSSEARCHTASKSTATUS.STS_CREATED;
 }
Ejemplo n.º 6
0
 public ModelExplorerSearchTask(EFModelExplorer modelExplorer
                                , uint dwCookie
                                , IVsSearchQuery pSearchQuery
                                , IVsSearchCallback pSearchCallback)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     this.modelExplorer = modelExplorer;
 }
Ejemplo n.º 7
0
 public SearchTask(
     IGitHubPaneViewModel viewModel,
     uint dwCookie,
     IVsSearchQuery pSearchQuery,
     IVsSearchCallback pSearchCallback)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     this.viewModel = viewModel;
 }
Ejemplo n.º 8
0
 public NuGetPackageManagerControlSearchTask(PackageManagerControl packageManagerControl, uint id, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
 {
     _packageManagerControl = packageManagerControl;
     _searchCallback        = pSearchCallback;
     _searchQuery           = pSearchQuery;
     Id        = id;
     ErrorCode = 0;
     SetStatus(VsSearchTaskStatus.Created);
 }
 public SearchTask(uint dwCookie,
                   IVsSearchQuery pSearchQuery,
                   IVsSearchCallback pSearchCallback,
                   IWpfTableControl[] controls,
                   IThreadingContext threadingContext)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     _threadingContext = threadingContext;
     _controls         = controls;
 }
Ejemplo n.º 10
0
 public SearchTask(
     JoinableTaskFactory joinableTaskFactory,
     IGitHubPaneViewModel viewModel,
     uint dwCookie,
     IVsSearchQuery pSearchQuery,
     IVsSearchCallback pSearchCallback)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     this.joinableTaskFactory = joinableTaskFactory;
     this.viewModel           = viewModel;
 }
        public override IVsSearchTask CreateSearch([ComAliasName("VsShell.VSCOOKIE")] uint dwCookie, IVsSearchQuery pSearchQuery,
                                                   IVsSearchCallback pSearchCallback)
        {
            if (TableControl == null)
            {
                System.Diagnostics.Debug.Fail("Attempting to search before initializing Error or Task ListWindow");
                throw new InvalidOperationException("Attempting to search before initializing Error or Task ListWindow");
            }

            return(new TableSearchTask(dwCookie, pSearchQuery, pSearchCallback, TableControl));
        }
Ejemplo n.º 12
0
        public VsSearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, ISearchHandler handler, CancellationTokenSource cts)
        {
            Check.ArgumentNull(nameof(pSearchQuery), pSearchQuery);
            Check.ArgumentNull(nameof(pSearchCallback), pSearchCallback);
            Check.Argument(nameof(dwCookie), () => dwCookie != VSConstants.VSCOOKIE_NIL);
            Check.ArgumentStringNullOrEmpty(nameof(pSearchQuery), pSearchQuery.SearchString);

            Id          = dwCookie;
            SearchQuery = pSearchQuery;
            ErrorCode   = 0;

            _searchCallback = pSearchCallback;
            _handler        = handler;
            _cts            = cts;
            _taskStatus     = (long)Created;
        }
Ejemplo n.º 13
0
 public EverythingSearchTask(uint dwCookie, IVsSearchQuery pSearchQuery,
                             IVsSearchCallback pSearchCallback, SearchWindow searchWindow)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     _searchWindow = searchWindow;
     ThreadHelper.Generic.Invoke(() =>
     {
         var searchBox  = (SearchBox)_searchWindow.Content;
         _searchBoxInfo = new SearchBoxInfo
         {
             Width    = searchBox.RenderSize.Width,
             FontSize = searchBox.FontSize,
             FontName = searchBox.FontFamily.ToString()
         };
     });
 }
Ejemplo n.º 14
0
        public IVsSearchTask?CreateSearch(
            uint dwCookie,
            IVsSearchQuery pSearchQuery,
            IVsSearchCallback pSearchCallback
            )
        {
            if (_control is not null)
            {
                var tables = _control.GetTableControls();
                return(new SearchTask(
                           dwCookie,
                           pSearchQuery,
                           pSearchCallback,
                           tables,
                           _threadingContext
                           ));
            }

            return(null);
        }
Ejemplo n.º 15
0
        public IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
        {
            var cts    = new CancellationTokenSource();
            var oldCts = Interlocked.Exchange(ref _cts, cts);

            oldCts?.Cancel();
            return(new VsSearchTask(dwCookie, pSearchQuery, pSearchCallback, _handler, cts));
        }
Ejemplo n.º 16
0
 /// <summary>Creates a new search task object. The task is cold-started - Start() needs to be called on the task object to begin the search.</summary>
 /// <param name="dwCookie">The search cookie.</param>
 /// <param name="pSearchQuery">The search query.</param>
 /// <param name="pSearchCallback">The search callback.</param>
 /// <returns>The search task.</returns>
 public IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
 {
     return(new ModelExplorerSearchTask(this, dwCookie, pSearchQuery, pSearchCallback));
 }
Ejemplo n.º 17
0
 public override IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
 {
     return new MemberSearchTask(dwCookie, pSearchQuery, pSearchCallback, this);
 }
        public override IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
        {
            ShowCommandExplorer();

            ISearchTaskTarget searchTarget = ((UserControl)ContentHost.Content).DataContext as ISearchTaskTarget;

            if (searchTarget == null || pSearchQuery == null || pSearchCallback == null)
            {
                return(null);
            }

            return(new SearchTask(dwCookie, pSearchQuery, pSearchCallback, searchTarget));
        }
Ejemplo n.º 19
0
 public override IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
 {
     if (SearchEnabled)
     {
         var grid = Content as VariableView;
         return(new VariableSearchTask(grid.RootTreeGrid, dwCookie, pSearchQuery, pSearchCallback));
     }
     return(null);
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MemberSearchTask" /> class.
 /// </summary>
 public MemberSearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, Action<string> callback)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     _callback = callback;
 }
Ejemplo n.º 21
0
 public HelpSearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     _callback         = pSearchCallback;
     _workflowProvider = VsAppShell.Current.ExportProvider.GetExportedValue <IRInteractiveWorkflowProvider>();
 }
Ejemplo n.º 22
0
 public override IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
 {
     return(new MemberSearchTask(dwCookie, pSearchQuery, pSearchCallback, x => NameFilter = x));
 }
Ejemplo n.º 23
0
 public override IVsSearchTask CreateSearch(uint cookie, IVsSearchQuery searchQuery, IVsSearchCallback searchCallback)
 {
     if (searchQuery == null || searchCallback == null)
         return null;
     return new SearchTask(cookie, searchQuery, searchCallback, this);
 }
Ejemplo n.º 24
0
 public override IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
 => new HistorySearchTask(dwCookie, _historyFiltering, pSearchQuery, pSearchCallback, Services);
Ejemplo n.º 25
0
 public SearchTask(uint cookie, IVsSearchQuery searchQuery, IVsSearchCallback searchCallback, MacrosToolWindow toolwindow)
     : base(cookie, searchQuery, searchCallback)
 {
     this.toolWindow = toolwindow;
 }
 public IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
 {
     SearchPackageInActivePackageSource(pSearchQuery.SearchString);
     return null;
 }
Ejemplo n.º 27
0
 public IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback) {
     var cts = new CancellationTokenSource();
     var oldCts = Interlocked.Exchange(ref _cts, cts);
     oldCts?.Cancel();
     return new VsSearchTask(dwCookie, pSearchQuery, pSearchCallback, _handler, cts);
 }
Ejemplo n.º 28
0
 public SearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, AppVeyorWindow toolwindow)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     ;
 }
Ejemplo n.º 29
0
 public override IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
 {
     return(new HistorySearchTask(dwCookie, _historyFiltering, pSearchQuery, pSearchCallback));
 }
Ejemplo n.º 30
0
 public HistorySearchTask(uint dwCookie, IRHistoryFiltering historyFiltering, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, IServiceContainer services)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     _historyFiltering = historyFiltering;
     _services         = services;
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MemberSearchTask" /> class.
 /// </summary>
 public MemberSearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, Action <string> callback)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     _callback = callback;
 }
Ejemplo n.º 32
0
        public SearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, AppVeyorWindow toolwindow)
            : base(dwCookie, pSearchQuery, pSearchCallback)

        {
            ;
        }
Ejemplo n.º 33
0
 public SearchTask(uint cookie, IVsSearchQuery searchQuery, IVsSearchCallback searchCallback, MacrosToolWindow toolwindow)
     : base(cookie, searchQuery, searchCallback)
 {
     this.toolWindow = toolwindow;
 }
Ejemplo n.º 34
0
        public override IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            return(this.control?.CreateSearch(dwCookie, pSearchQuery, pSearchCallback));
        }
 public XPathSearchTask(uint taskIdCookie, IVsSearchQuery searchQuery, IVsSearchCallback searchCallback, XPathWorkbenchWindow workbenchWindow)
     : base(taskIdCookie, searchQuery, searchCallback)
 {
     _workbenchWindow = workbenchWindow;
 }
Ejemplo n.º 36
0
 public HistorySearchTask(uint dwCookie, IRHistoryFiltering historyFiltering, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     _historyFiltering = historyFiltering;
 }
Ejemplo n.º 37
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MemberSearchTask" /> class.
 /// </summary>
 public MemberSearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, SpadeToolWindow toolWindow)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     _toolWindow = toolWindow;
 }
Ejemplo n.º 38
0
 public override IVsSearchTask CreateSearch(uint cookie, IVsSearchQuery searchQuery, IVsSearchCallback searchCallback)
 {
     if (searchQuery == null || searchCallback == null)
     {
         return(null);
     }
     return(new SearchTask(cookie, searchQuery, searchCallback, this));
 }
Ejemplo n.º 39
0
 public HelpSearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, IServiceContainer services)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     _callback         = pSearchCallback;
     _workflowProvider = services.GetService <IRInteractiveWorkflowProvider>();
 }
Ejemplo n.º 40
0
 public override IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
 {
     return(new HelpSearchTask(dwCookie, pSearchQuery, pSearchCallback));
 }
Ejemplo n.º 41
0
 public IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
 {
     SearchPackagesAndRefreshUpdateCount(pSearchQuery.SearchString, useCache: true);
     return(null);
 }
 public TableSearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, IWpfTableControl control)
     : base(dwCookie, pSearchQuery, pSearchCallback)
 {
     _control = control;
 }
Ejemplo n.º 43
0
 public VariableSearchTask(TreeGrid grid, uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
     : base(dwCookie, pSearchQuery, pSearchCallback) {
     _grid = grid;
     _callback = pSearchCallback;
 }