Exemple #1
0
        public override Task GetResults(
            ISearchResultCallback searchResultCallback,
            SearchPopupSearchPattern pattern,
            CancellationToken token)
        {
            if (!IsValidTag(pattern.Tag))
            {
                return(Task.FromResult(0));
            }

            var command = new PackageSearchCommand(pattern.Pattern);
            var result  = new NuGetPackageSearchResult(command);

            if (result.CanBeDisplayed())
            {
                searchResultCallback.ReportResult(result);
            }
            return(Task.FromResult(0));
        }
		public NuGetPackageDataSource (SearchPopupSearchPattern searchPattern)
		{
			this.searchPattern = searchPattern;
			command = new PackageSearchCommand (searchPattern.Pattern);
		}
Exemple #3
0
 public NuGetPackageDataSource(SearchPopupSearchPattern searchPattern)
 {
     this.searchPattern = searchPattern;
     command            = new PackageSearchCommand(searchPattern.Pattern);
 }
Exemple #4
0
 public NuGetPackageSearchResult(PackageSearchCommand command)
     : base("", "", 0)
 {
     this.command = command;
 }