C# Class NuGet.PackageReferenceRepository

This repository implementation keeps track of packages that are referenced in a project but it also has a reference to the repository that actually contains the packages. It keeps track of packages in an xml file at the project root (packages.xml).
Inheritance: IPackageReferenceRepository, IPackageLookup, IPackageConstraintProvider, ILatestPackageLookup
Afficher le fichier Open project: themotleyfool/NuGet Class Usage Examples

Private Properties

Свойство Type Description
GetPackageReference PackageReference
GetPackagesCore IEnumerable

Méthodes publiques

Méthode Description
AddPackage ( IPackage package ) : void
AddPackage ( string packageId, SemanticVersion version, FrameworkName targetFramework ) : void
Exists ( string packageId, SemanticVersion version ) : bool
FindPackage ( string packageId, SemanticVersion version ) : IPackage
GetConstraint ( string packageId ) : IVersionSpec
GetPackageTargetFramework ( string packageId ) : FrameworkName
GetPackages ( ) : IQueryable
PackageReferenceRepository ( IFileSystem fileSystem, ISharedPackageRepository sourceRepository ) : System
RegisterIfNecessary ( ) : void
RemovePackage ( IPackage package ) : void
TryFindLatestPackageById ( string id, SemanticVersion &latestVersion ) : bool

Private Methods

Méthode Description
GetPackageReference ( string packageId ) : PackageReference
GetPackagesCore ( ) : IEnumerable

Method Details

AddPackage() public méthode

public AddPackage ( IPackage package ) : void
package IPackage
Résultat void

AddPackage() public méthode

public AddPackage ( string packageId, SemanticVersion version, FrameworkName targetFramework ) : void
packageId string
version SemanticVersion
targetFramework FrameworkName
Résultat void

Exists() public méthode

public Exists ( string packageId, SemanticVersion version ) : bool
packageId string
version SemanticVersion
Résultat bool

FindPackage() public méthode

public FindPackage ( string packageId, SemanticVersion version ) : IPackage
packageId string
version SemanticVersion
Résultat IPackage

GetConstraint() public méthode

public GetConstraint ( string packageId ) : IVersionSpec
packageId string
Résultat IVersionSpec

GetPackageTargetFramework() public méthode

public GetPackageTargetFramework ( string packageId ) : FrameworkName
packageId string
Résultat FrameworkName

GetPackages() public méthode

public GetPackages ( ) : IQueryable
Résultat IQueryable

PackageReferenceRepository() public méthode

public PackageReferenceRepository ( IFileSystem fileSystem, ISharedPackageRepository sourceRepository ) : System
fileSystem IFileSystem
sourceRepository ISharedPackageRepository
Résultat System

RegisterIfNecessary() public méthode

public RegisterIfNecessary ( ) : void
Résultat void

RemovePackage() public méthode

public RemovePackage ( IPackage package ) : void
package IPackage
Résultat void

TryFindLatestPackageById() public méthode

public TryFindLatestPackageById ( string id, SemanticVersion &latestVersion ) : bool
id string
latestVersion SemanticVersion
Résultat bool