Presumably you have an ASP.NET application that uses the NuGet.Server package.
Then it would be pretty easy to add some entries. You can decorate PackageService:
public class MyPackageService : IPackageService { public MyPackageService(PackageService packageService) { _PackageService = packageService; } private readonly PackageService _PackageService; public void CreatePackage(HttpContextBase context) { _PackageService.CreatePackage(context); } public void DeletePackage(HttpContextBase context) { _PackageService.DeletePackage(context); } public void DownloadPackage(HttpContextBase context) {
and then modify Routes.cs to re-bind to MyPackageService .
public static class NuGetRoutes { public static void Start() { NinjectBootstrapper.Kernel.Rebind<IPackageService>().To<MyPackageService>(); MapRoutes(RouteTable.Routes); }
source share