public Bootstrapper(string path) { var machineWideSettings = new BonsaiMachineWideSettings(); var settings = Settings.LoadDefaultSettings(AppDomain.CurrentDomain.BaseDirectory, null, machineWideSettings); var sourceProvider = new PackageSourceProvider(settings); packageManager = new RestorePackageManager(sourceProvider, path); }
protected static LicenseAwarePackageManager CreatePackageManager(string path) { var logger = new EventLogger(); var machineWideSettings = new BonsaiMachineWideSettings(); var settings = Settings.LoadDefaultSettings(new PhysicalFileSystem(AppDomain.CurrentDomain.BaseDirectory), null, machineWideSettings); var sourceProvider = new PackageSourceProvider(settings); var sourceRepository = sourceProvider.CreateAggregateRepository(PackageRepositoryFactory.Default, true); return(new LicenseAwarePackageManager(sourceRepository, path) { Logger = logger }); }
static LicenseAwarePackageManager CreatePackageManager(string path) { var logger = new EventLogger(); var machineWideSettings = new BonsaiMachineWideSettings(); var settings = Settings.LoadDefaultSettings(null, null, machineWideSettings); var sourceProvider = new PackageSourceProvider(settings); var sourceRepository = sourceProvider.CreateAggregateRepository(PackageRepositoryFactory.Default, true); return(new LicenseAwarePackageManager(sourceRepository, path) { Logger = logger }); }
public PackageViewController( NuGetFramework projectFramework, string path, Control owner, PackageView view, PackageDetails details, PackagePageSelector pageSelector, ImageList icons, CueBannerComboBox search, CheckBox prerelease, Func <bool> updateFeed, Action <bool> multiOperationVisible, IEnumerable <string> packageTypeFilter) { ProjectFramework = projectFramework ?? throw new ArgumentNullException(nameof(projectFramework)); control = owner ?? throw new ArgumentNullException(nameof(owner)); packageView = view ?? throw new ArgumentNullException(nameof(view)); packageDetails = details ?? throw new ArgumentNullException(nameof(details)); packagePageSelector = pageSelector ?? throw new ArgumentNullException(nameof(pageSelector)); packageIcons = icons ?? throw new ArgumentNullException(nameof(icons)); searchComboBox = search ?? throw new ArgumentNullException(nameof(search)); prereleaseCheckBox = prerelease ?? throw new ArgumentNullException(nameof(prerelease)); getUpdateFeed = updateFeed ?? throw new ArgumentNullException(nameof(updateFeed)); setMultiOperationVisible = multiOperationVisible ?? throw new ArgumentNullException(nameof(multiOperationVisible)); packageTypes = packageTypeFilter; control.KeyDown += control_KeyDown; prereleaseCheckBox.CheckedChanged += prereleaseFilterCheckBox_CheckedChanged; packagePageSelector.SelectedIndexChanged += packagePageSelector_SelectedIndexChanged; packagePageSelector.Visible = false; packageManagerPath = path; iconCache = new ConcurrentDictionary <Uri, IObservable <Image> >(); defaultIcon = GetPackageIcon(PackageDefaultIconUrl); activeRequests = new List <IDisposable>(); var machineWideSettings = new BonsaiMachineWideSettings(); var settings = Settings.LoadDefaultSettings(AppDomain.CurrentDomain.BaseDirectory, null, machineWideSettings); packageSourceProvider = new PackageSourceProvider(settings); PackageManager = CreatePackageManager(packageSourceProvider, Enumerable.Empty <PackageManagerPlugin>()); searchComboBox.CueBanner = Resources.SearchCueBanner; packageDetails.ProjectFramework = ProjectFramework; packageDetails.PathResolver = PackageManager.PathResolver; }