public NuGetSearchService(IFactory <SourceRepository, IPackageSource> repositoryFactory, ILog log, NuGetPackageContentService contentService, NuGetPackageVersionService versionService, INuGetPackageFilter filter = null, INuGetSearchTermTransformer termTransformer = null) { Ensure.NotNull(repositoryFactory, "repositoryFactory"); Ensure.NotNull(log, "log"); Ensure.NotNull(contentService, "contentService"); Ensure.NotNull(versionService, "versionService"); if (filter == null) { filter = OkNuGetPackageFilter.Instance; } this.repositoryFactory = repositoryFactory; this.log = log; this.contentService = contentService; this.nuGetLog = new NuGetLogger(log); this.versionService = versionService; this.filter = filter ?? OkNuGetPackageFilter.Instance; this.queryTransformer = termTransformer ?? EmptyNuGetSearchTermTransformer.Instance; }
public NuGetInstallService(IFactory <SourceRepository, IPackageSource> repositoryFactory, ILog log, string path, NuGetPackageContentService contentService, NuGetPackageVersionService versionService, INuGetPackageFilter packageFilter = null, NuGetPackageContent.IFrameworkFilter frameworkFilter = null) { Ensure.NotNull(repositoryFactory, "repositoryFactory"); Ensure.NotNull(log, "log"); Ensure.NotNull(path, "path"); Ensure.NotNull(contentService, "contentService"); Ensure.NotNull(versionService, "versionService"); this.repositoryFactory = repositoryFactory; this.log = log; this.nuGetLog = new NuGetLogger(log); Path = path; this.contentService = contentService; this.versionService = versionService; this.frameworkFilter = frameworkFilter; if (packageFilter == null) { packageFilter = OkNuGetPackageFilter.Instance; } this.packageFilter = packageFilter; }