Ejemplo n.º 1
0
        InstallNuGetPackageAction CreateInstallNuGetPackageAction(
            DotNetProject dotNetProject,
            ProjectTemplateSourceRepositoryProvider repositoryProvider,
            ProjectTemplatePackageReference packageReference)
        {
            var primaryRepositories   = repositoryProvider.GetRepositories(packageReference).ToList();
            var secondaryRepositories = GetSecondaryRepositories(primaryRepositories, packageReference);
            var solutionManager       = PackageManagementServices.Workspace.GetSolutionManager(dotNetProject.ParentSolution);

            var context = new NuGetProjectContext(solutionManager.Settings)
            {
                FileConflictResolution = FileConflictAction.IgnoreAll
            };

            return(new InstallNuGetPackageAction(
                       primaryRepositories,
                       secondaryRepositories,
                       solutionManager,
                       new DotNetProjectProxy(dotNetProject),
                       context)
            {
                LicensesMustBeAccepted = packageReference.RequireLicenseAcceptance,
                OpenReadmeFile = false
            });
        }
Ejemplo n.º 2
0
        InstallNuGetPackageAction CreateInstallNuGetPackageAction(
            DotNetProject dotNetProject,
            ProjectTemplateSourceRepositoryProvider repositoryProvider,
            ProjectTemplatePackageReference packageReference)
        {
            var primaryRepositories   = repositoryProvider.GetRepositories(packageReference.IsLocalPackage);
            var secondaryRepositories = GetSecondaryRepositories(primaryRepositories, packageReference.IsLocalPackage);

            return(new InstallNuGetPackageAction(
                       primaryRepositories,
                       secondaryRepositories,
                       PackageManagementServices.Workspace.GetSolutionManager(dotNetProject.ParentSolution),
                       new DotNetProjectProxy(dotNetProject),
                       new NuGetProjectContext()));
        }
		InstallNuGetPackageAction CreateInstallNuGetPackageAction (
			DotNetProject dotNetProject,
			ProjectTemplateSourceRepositoryProvider repositoryProvider,
			ProjectTemplatePackageReference packageReference)
		{
			var primaryRepositories = repositoryProvider.GetRepositories (packageReference).ToList ();
			var secondaryRepositories = GetSecondaryRepositories (primaryRepositories, packageReference);

			return new InstallNuGetPackageAction (
				primaryRepositories,
				secondaryRepositories,
				PackageManagementServices.Workspace.GetSolutionManager (dotNetProject.ParentSolution),
				new DotNetProjectProxy (dotNetProject),
				new NuGetProjectContext ());
		}