// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; using System.ComponentModel; using System.Linq; using NuGet; namespace System.Web.WebPages.Administration.PackageManager { [EditorBrowsable(EditorBrowsableState.Never)] public interface IWebProjectManager { /// /// The repository where packages are installed. /// IPackageRepository LocalRepository { get; } /// /// Remote feed to fetch packages from. /// IPackageRepository SourceRepository { get; } /// /// Gets packages from the SourceRepository /// /// One or more terms separated by a whitespace used to filter packages. /// Determines if packages are filtered by tag identifying packages for Asp.Net WebPages. IQueryable GetRemotePackages(string searchTerms, bool filterPreferred); /// /// Gets packages from the LocalRepository. /// /// One or more terms separated by a whitespace used to filter packages. IQueryable GetInstalledPackages(string searchTerms); /// /// Gets packages from the RemoteRepository that are updates to installed packages. /// /// One or more terms separated by a whitespace used to filter packages. /// IEnumerable GetPackagesWithUpdates(string searchTerms, bool filterPreferredPackages); /// /// Installs the package to the LocalRepository. /// /// The package to be installed. /// The AppDomain that is used to determine binding redirects. If null, the current AppDomain would be used. /// A sequence of errors that occurred during the operation. IEnumerable InstallPackage(IPackage package, AppDomain appDomain); /// /// Updates the package in the LocalRepository. /// /// The package to be installed. /// The AppDomain that is used to determine binding redirects. If null, the current AppDomain would be used. /// A sequence of errors that occurred during the operation. IEnumerable UpdatePackage(IPackage package, AppDomain appDomain); /// /// Removes the package from the LocalRepository. /// /// A sequence of errors that occurred during the operation. IEnumerable UninstallPackage(IPackage package, bool removeDependencies); /// /// Gets the latest version of the package. /// /// The package to find updates for. IPackage GetUpdate(IPackage package); /// /// Determines if any version of a package is installed in the LocalRepository. /// bool IsPackageInstalled(IPackage package); } }