public PackageVersionSearchCompletionDataList(IPackageSearchManager searchManager, string tfm, string packageId) { this.searchManager = searchManager; this.tfm = tfm; this.packageId = packageId; StartSearch(); }
public PackageCompletionSource(ITextBuffer textBuffer, ICompletionBroker completionBroker, IClassifierAggregatorService classifier, IPackageSearchManager searchManager) { _classifier = classifier.GetClassifier(textBuffer); _searchManager = searchManager; _textBuffer = textBuffer; _completionBroker = completionBroker; textBuffer.Properties.AddProperty(typeof(PackageCompletionSource), this); }
public PackageSearchCompletionData( IPackageSearchManager manager, string name, string packageId, string packageVersion, string tfm) : base(name, Stock.Reference) { this.manager = manager; this.packageId = packageId; this.packageVersion = packageVersion; this.tfm = tfm; }
public PackageInfoControl(string packageId, string version, string tfm, IPackageSearchManager searcher) { InitializeComponent(); PackageId.Content = packageId; Glyph.Source = WpfUtil.MonikerToBitmap(KnownMonikers.NuGet, 32); Glyph.ImageFailed += OnImageFailed; _job = searcher.SearchPackageInfo(packageId, version, tfm); _job.Updated += JobUpdated; _firstRun = true; JobUpdated(null, EventArgs.Empty); }
private PackageCompletionSource(ITextBuffer textBuffer, ICompletionBroker completionBroker, IClassifierAggregatorService classifier, IPackageSearchManager searchManager) { _classifier = classifier.GetClassifier(textBuffer); _searchManager = searchManager; _textBuffer = textBuffer; _completionBroker = completionBroker; if (textBuffer.Properties.ContainsProperty(typeof(PackageCompletionSource))) { textBuffer.Properties.RemoveProperty(typeof(PackageCompletionSource)); } textBuffer.Properties.AddProperty(typeof(PackageCompletionSource), this); }
protected override void Initialize() { base.Initialize(); //we don't have a MEF composition here, set it up manually PackageSearchManager = new PackageSearchManager( new MonoDevelopPackageFeedRegistry(), new PackageFeedFactorySelector(new IPackageFeedFactory [] { new NuGetDiskFeedFactory(new FileSystem()), new NuGetV3ServiceFeedFactory(new WebRequestFactory()), }) ); CheckHighlighting(); }
public static Task <IReadOnlyList <IPackageInfo> > SearchPackageInfo( this IPackageSearchManager manager, string packageId, string packageVersion, string tfm, CancellationToken cancelToken) { var search = manager.SearchPackageInfo(packageId, packageVersion, tfm); if (search.RemainingFeeds.Count == 0) { return(Task.FromResult(search.Results)); } var tcs = new TaskCompletionSource <IReadOnlyList <IPackageInfo> > (); //making sure we actually unregister the eventhandler is kinda tricky //it could be already completed, or it could complete after we check but before we register EventHandler handleSearchUpdated = null; cancelToken.Register(() => { search.Cancel(); if (tcs.TrySetCanceled()) { search.Updated -= handleSearchUpdated; } }); handleSearchUpdated = (s, a) => { if (!cancelToken.IsCancellationRequested && search.RemainingFeeds.Count == 0) { if (tcs.TrySetResult(search.Results)) { search.Updated -= handleSearchUpdated; } } }; search.Updated += handleSearchUpdated; if (search.RemainingFeeds.Count == 0) { handleSearchUpdated(search, EventArgs.Empty); } return(tcs.Task); }
public PackageIntellisenseControllerProvider(ICompletionBroker completionBroker, IPackageSearchManager searchManager) { CompletionBroker = completionBroker; _searchManager = searchManager; }
public PackageQuickInfoSource(IPackageSearchManager searchManager) { _searchManager = searchManager; }
public PackageQuickInfoProvider(IPackageSearchManager searchManager) { _searchManager = searchManager; }
public MsBuildPropertyQuickInfoSource(IWorkspaceManager workspaceManager, IPackageSearchManager searchManager) { _searchManager = searchManager; _workspaceManager = workspaceManager; }
public PackageCompletionSourceProvider(ICompletionBroker completionBroker, IPackageSearchManager searchManager, IClassifierAggregatorService classifier) { _classifier = classifier; _completionBroker = completionBroker; _searchManager = searchManager; }
public PackageNameSearchCompletionDataList(string initialSearch, IPackageSearchManager searchManager, string tfm) { this.searchManager = searchManager; this.tfm = tfm; StartSearch(initialSearch); }
public CompletionTooltipElementProvider(IPackageSearchManager searcher) { _searcher = searcher; }
public static PackageCompletionSource GetOrAddCompletionSource(ITextBuffer textBuffer, ICompletionBroker completionBroker, IClassifierAggregatorService classifier, IPackageSearchManager searchManager) { if (textBuffer.Properties.TryGetProperty(typeof(PackageCompletionSource), out PackageCompletionSource source)) { return(source); } return(new PackageCompletionSource(textBuffer, completionBroker, classifier, searchManager)); }
public DotnetCliToolReferenceGlyphTaggerProvider(IPackageSearchManager searchManager) { _searchManager = searchManager; }
public QuickInfoProvider(IWorkspaceManager workspaceManager, IPackageSearchManager searchManager) { _searchManager = searchManager; _workspaceManager = workspaceManager; }
public PackageGlyphTagFactory(IPackageSearchManager searchManager) { _searchManager = searchManager; }
public PackageReferenceGlyphTaggerProvider(IPackageSearchManager searchManager) { _searchManager = searchManager; }