C# Class NuGet.Commands.InstallCommand

Inheritance: Command
Datei anzeigen Open project: themotleyfool/NuGet Class Usage Examples

Private Properties

Property Type Description
EnsureFileExists void
EnsurePackageRestoreConsent void
ExecuteInParallel bool
ExecuteLocked void
GenerateUniqueToken string
GetRepository IPackageRepository
InstallCommand System
InstallPackage bool
InstallPackagesFromConfigFile void
IsPackageInstalled bool

Public Methods

Method Description
ExecuteCommand ( ) : void

Protected Methods

Method Description
CreateFileSystem ( ) : IFileSystem
CreatePackageManager ( IFileSystem fileSystem ) : IPackageManager
GetPackageReferenceFile ( string path ) : PackageReferenceFile
InstallCommand ( IPackageRepositoryFactory packageRepositoryFactory, IPackageSourceProvider sourceProvider, ISettings configSettings, IPackageRepository cacheRepository ) : System

Private Methods

Method Description
EnsureFileExists ( IFileSystem fileSystem, string configFilePath ) : void
EnsurePackageRestoreConsent ( bool packageRestoreConsent ) : void
ExecuteInParallel ( IFileSystem fileSystem, List packageReferences ) : bool
ExecuteLocked ( string name, System.Action action ) : void
GenerateUniqueToken ( IPackageManager packageManager, string packageId, SemanticVersion version ) : string

We want to base the lock name off of the full path of the package, however, the Mutex looks for files on disk if a path is given. Additionally, it also fails if the string is longer than 256 characters. Therefore we obtain a base-64 encoded hash of the path.

GetRepository ( ) : IPackageRepository
InstallCommand ( IPackageRepositoryFactory packageRepositoryFactory, IPackageSourceProvider sourceProvider ) : System
InstallPackage ( IFileSystem fileSystem, string packageId, SemanticVersion version, bool ignoreDependencies, bool packageRestoreConsent, string operation ) : bool
InstallPackagesFromConfigFile ( IFileSystem fileSystem, PackageReferenceFile file ) : void
IsPackageInstalled ( LocalPackageRepository packageRepository, IFileSystem fileSystem, string packageId, SemanticVersion version ) : bool

Method Details

CreateFileSystem() protected method

protected CreateFileSystem ( ) : IFileSystem
return IFileSystem

CreatePackageManager() protected method

protected CreatePackageManager ( IFileSystem fileSystem ) : IPackageManager
fileSystem IFileSystem
return IPackageManager

ExecuteCommand() public method

public ExecuteCommand ( ) : void
return void

GetPackageReferenceFile() protected method

protected GetPackageReferenceFile ( string path ) : PackageReferenceFile
path string
return PackageReferenceFile

InstallCommand() protected method

protected InstallCommand ( IPackageRepositoryFactory packageRepositoryFactory, IPackageSourceProvider sourceProvider, ISettings configSettings, IPackageRepository cacheRepository ) : System
packageRepositoryFactory IPackageRepositoryFactory
sourceProvider IPackageSourceProvider
configSettings ISettings
cacheRepository IPackageRepository
return System