Skip to content

huomm23/Orc.NuGetExplorer

 
 

Repository files navigation

Orc.NuGetExplorer

Join the chat at https://gitter.im/WildGums/Orc.NuGetExplorer

License NuGet downloads Version Pre-release version

This library provides everything you need to explore and download packages from the NuGet gallery as well as any private feed.

It can be used as part of a plugin system for your application.

Features

  • WPF user interface
  • Explore packages that are:
    • Already installed
    • Available online
    • Ready to be updated
  • Support package sources, which requires authentication
  • Smart update (Recommends updates for your plugins)
  • Verification of package source
  • Ability to work in the background

NuGet Packages

library consists of two NuGet packages:

Screenshots

Packages available:

NuGetExplorer 01

Available updates:

NuGetExplorer 02

Recommended updates:

NuGetExplorer 03

How to use

NuGetExplorer is made up of several services:

  • INuGetConfigurationService => Configure NuGetExplorer
  • INuGetFeedVerificationService => Verify the package source feed
  • IPackageBatchService => Show a window with a list of package to take action on
  • IPackageOperationService => Execute an operation with the package (Install, Uninstall or Update)
  • IPackageQueryService => Can be used to search packages in the background
  • IPackagesUIService => Show the NuGetExplorer window
  • IPackagesUpdatesSearcherService => Used for searching updates with the options of release/prerelease/recommended
  • IRepositoryService => Used to get access to specific repositories. Can be used in conjunction with IPackageQueryService

Watcher:

  • PackageManagerWatcherBase => Abstract class, which is used to create a watcher for package management operations

Examples

Usage of IPackagesUIService for showing NuGetExplorer dialog box

public class NuGetManager
{
    private readonly IPackagesUIService _packagesUiService;
    
    public NuGetManager(IPackagesUIService packagesUiService)
    {
        Argument.IsNotNull(() => packagesUiService);
        
        _packagesUiService = packagesUiService;
    }
    
    private async Task ShowNuGetDialog()
    {
	    await _packagesUiService.ShowPackagesExplorer();
    }
}

Use IPackageBatchService and IPackagesUpdatesSearcherService for checking for updates

public class SmartUpdater
{
    private readonly IPackagesUpdatesSearcherService _packagesUpdatesSearcherService;
    private readonly IPackageBatchService _packageBatchService;
    
    public SmartUpdater(IPackageBatchService packageBatchService, IPackagesUpdatesSearcherService packagesUpdatesSearcherService)
    {
        Argument.IsNotNull(() => packageBatchService);
        Argument.IsNotNull(() => packagesUpdatesSearcherService);
        
        _packageBatchService = packageBatchService;
        _packagesUpdatesSearcherService = packagesUpdatesSearcherService;
    }
    
    private async Task ShowRecommenedUpdates()
    {
        var packages = await _packagesUpdatesSearcherService.SearchForUpdatesAsync(false);
	    await _packageBatchService.ShowPackagesBatchAsync(packages, PackageOperationType.Update);
    }
}

About

WPF control to facilitate the exploration of NuGet packages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.5%
  • Other 0.5%