C# 클래스 Rock.Services.NuGet.WebProjectManager

This is the service layer that handles installing, updating, removing Packages (aka Plugins) from the website / local filesystem and the Rock Quarry (our NuGet server).
파일 보기 프로젝트 열기: NewSpring/Rock

공개 메소드들

메소드 설명
GetInstalledPackage ( string packageId ) : IPackage

Gets all matching installed packages for the given keyword search for which updates are available.

Gets the locally installed package for the given id.

GetInstalledPackages ( string searchTerms ) : IQueryable

Gets all matching installed packages for the given keyword search.

GetLatestRemotePackages ( string searchTerms, bool includeAllVersions ) : IQueryable

Gets the newest/latest package or all of them matching the given keyword search.

GetRemotePackage ( string packageId ) : IPackage

Gets a package for the given id from the source repository.

GetRemotePackages ( string searchTerms ) : IQueryable

Gets all matching packages for the given keyword search.

GetUpdate ( IPackage package ) : IPackage

Gets the latest version of the given package.

GetUpdates ( string packageId ) : IEnumerable

Gets all listed versions of the given package.

InstallPackage ( IPackage package ) : IEnumerable

Installs and adds a package reference to the project

IsPackageInstalled ( IPackage package ) : bool

Will let you know if this exact package is installed locally

IsPackageInstalled ( IPackage package, bool anyVersion ) : bool

Will let you know if this package is installed locally. If anyVersion is true it does not matter which version of the package; otherwise only returns true if an exact match.

UninstallPackage ( IPackage package, bool removeDependencies ) : IEnumerable

Removes a package reference and uninstalls the package

UpdatePackage ( IPackage package ) : IEnumerable

Updates a package reference. Installs the package to the App_Data repository if it does not already exist.

UpdatePackageAndBackup ( IPackage package, IPackage oldPackage ) : IEnumerable

Updates a package reference. Installs the package to the App_Data repository if it does not already exist.

WebProjectManager ( string remoteSource, string siteRoot ) : System

Creates a WebProjectManager service.

보호된 메소드들

메소드 설명
Backup ( IPackage package ) : void

Make a backup of the given package.

Restore ( IPackage package ) : void

Restore the backup copy of the given package.

비공개 메소드들

메소드 설명
GetPackageDependencies ( IPackage package, IPackageRepository localRepository, IPackageRepository sourceRepository ) : IEnumerable

Gets the package dependencies.

GetPackages ( IPackageRepository repository, string searchTerm ) : IQueryable

Gets the packages.

GetPackages ( IQueryable packages, string searchTerm ) : IQueryable

Gets the packages.

GetPackagesRequiringLicenseAcceptance ( IPackage package ) : IEnumerable

Gets the packages requiring license acceptance.

GetPackagesRequiringLicenseAcceptance ( IPackage package, IPackageRepository localRepository, IPackageRepository sourceRepository ) : IEnumerable

Gets the packages requiring license acceptance.

GetWebRepositoryDirectory ( string siteRoot ) : string

Gets the web repository directory.

GetWebRepositoryRestoreDirectory ( string siteRoot ) : string

Gets the location of web repository backup directory.

PerformLoggedAction ( System.Action action ) : IEnumerable

Performs the logged action.

ProjectManager_PackageReferenceAdded ( object sender, NuGet.PackageOperationEventArgs e ) : void

NOTE *************************************************************************** This event handler is needed because the current version of NuGet.Core has a bug when calling WebProjectSsyte.AddReferences() method. It is passing a null stream object resulting in zero byte bin files getting written. SEE: http://nuget.codeplex.com/discussions/253750 http://nuget.codeplex.com/discussions/479191 http://nuget.codeplex.com/workitem/4029 ********************************************************************************

메소드 상세

Backup() 보호된 메소드

Make a backup of the given package.
protected Backup ( IPackage package ) : void
package IPackage
리턴 void

GetInstalledPackage() 공개 메소드

Gets all matching installed packages for the given keyword search for which updates are available. Gets the locally installed package for the given id.
public GetInstalledPackage ( string packageId ) : IPackage
packageId string the Id of a package
리턴 IPackage

GetInstalledPackages() 공개 메소드

Gets all matching installed packages for the given keyword search.
public GetInstalledPackages ( string searchTerms ) : IQueryable
searchTerms string a string of space delimited search terms
리턴 IQueryable

GetLatestRemotePackages() 공개 메소드

Gets the newest/latest package or all of them matching the given keyword search.
public GetLatestRemotePackages ( string searchTerms, bool includeAllVersions ) : IQueryable
searchTerms string a string of space delimited search terms
includeAllVersions bool if true, returns all matching packages; otherwise only the latest
리턴 IQueryable

GetRemotePackage() 공개 메소드

Gets a package for the given id from the source repository.
public GetRemotePackage ( string packageId ) : IPackage
packageId string the Id of a package
리턴 IPackage

GetRemotePackages() 공개 메소드

Gets all matching packages for the given keyword search.
public GetRemotePackages ( string searchTerms ) : IQueryable
searchTerms string a string of space delimited search terms
리턴 IQueryable

GetUpdate() 공개 메소드

Gets the latest version of the given package.
public GetUpdate ( IPackage package ) : IPackage
package IPackage a package
리턴 IPackage

GetUpdates() 공개 메소드

Gets all listed versions of the given package.
public GetUpdates ( string packageId ) : IEnumerable
packageId string the Id of a package
리턴 IEnumerable

InstallPackage() 공개 메소드

Installs and adds a package reference to the project
public InstallPackage ( IPackage package ) : IEnumerable
package IPackage
리턴 IEnumerable

IsPackageInstalled() 공개 메소드

Will let you know if this exact package is installed locally
public IsPackageInstalled ( IPackage package ) : bool
package IPackage
리턴 bool

IsPackageInstalled() 공개 메소드

Will let you know if this package is installed locally. If anyVersion is true it does not matter which version of the package; otherwise only returns true if an exact match.
public IsPackageInstalled ( IPackage package, bool anyVersion ) : bool
package IPackage
anyVersion bool
리턴 bool

Restore() 보호된 메소드

Restore the backup copy of the given package.
protected Restore ( IPackage package ) : void
package IPackage
리턴 void

UninstallPackage() 공개 메소드

Removes a package reference and uninstalls the package
public UninstallPackage ( IPackage package, bool removeDependencies ) : IEnumerable
package IPackage
removeDependencies bool
리턴 IEnumerable

UpdatePackage() 공개 메소드

Updates a package reference. Installs the package to the App_Data repository if it does not already exist.
public UpdatePackage ( IPackage package ) : IEnumerable
package IPackage
리턴 IEnumerable

UpdatePackageAndBackup() 공개 메소드

Updates a package reference. Installs the package to the App_Data repository if it does not already exist.
public UpdatePackageAndBackup ( IPackage package, IPackage oldPackage ) : IEnumerable
package IPackage
oldPackage IPackage
리턴 IEnumerable

WebProjectManager() 공개 메소드

Creates a WebProjectManager service.
public WebProjectManager ( string remoteSource, string siteRoot ) : System
remoteSource string URL of the NuGet server API (ex, http://nuget.org/api/v2 ).
siteRoot string The physical path to the web root.
리턴 System