Exemplo n.º 1
0
        public NuGetPackageVersionService(NuGetPackageContentService contentService, ILog log, INuGetPackageFilter filter = null, NuGetPackageContent.IFrameworkFilter frameworkFilter = null)
        {
            Ensure.NotNull(contentService, "contentService");
            Ensure.NotNull(log, "log");
            this.contentService = contentService;
            this.log            = log;
            this.nuGetLog       = new NuGetLogger(log);

            if (filter == null)
            {
                filter = OkNuGetPackageFilter.Instance;
            }

            this.filter          = filter;
            this.frameworkFilter = frameworkFilter;
        }
        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;
        }
Exemplo n.º 3
0
        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;
        }