C# Class Microsoft.PackageManagement.NuGetProvider.NuGetRequest

This class drives the Request class that is an interface exposed from the PackageManagement Platform to the provider to use.
Inheritance: Request
Show file Open project: OneGet/NuGetProvider Class Usage Examples

Private Properties

Property Type Description
AddPackageSource void
CreateDirectoryInternal void
FilterOnContains IEnumerable
FilterOnName IEnumerable
FilterOnTags IEnumerable
FilterOnVersion IEnumerable
FindRegisteredSource PackageSource
GetInstalledPackages bool
GetInstalledPackagesOptionValue IEnumerable
GetPackageByFastpath PackageItem
GetPackageByFilePath PackageItem
GetPackageByFilePath PackageItem
GetPackageById IEnumerable
GetPackageById IEnumerable
LocationCloseEnoughMatch bool
MakeFastPath string
MakeTagId string
MinAndMaxVersionMatched bool
RemovePackageSource void
ResolvePackageSource PackageSource
SearchForPackages IEnumerable
SearchForPackages IEnumerable
TryParseFastPath bool
ValidateSourceLocation bool
YieldPackage bool
YieldPackages bool

Protected Methods

Method Description
NuGetRequest ( ) : System

Ctor required by the PackageManagement Platform

Private Methods

Method Description
AddPackageSource ( string name, string location, bool isTrusted, bool isValidated ) : void

Register the package source

CreateDirectoryInternal ( string dirPath ) : void
FilterOnContains ( IEnumerable pkgs ) : IEnumerable
FilterOnName ( IEnumerable pkgs, string searchTerm, bool useWildCard ) : IEnumerable
FilterOnTags ( IEnumerable pkgs ) : IEnumerable
FilterOnVersion ( IEnumerable pkgs, string requiredVersion, string minimumVersion, string maximumVersion, bool minInclusive = true, bool maxInclusive = true ) : IEnumerable
FindRegisteredSource ( string name ) : PackageSource

Return the package source object

GetInstalledPackages ( string name, string requiredVersion, string minimumVersion, string maximumVersion, bool minInclusive = true, bool maxInclusive = true, bool terminateFirstFound = false ) : bool

Search in the destination of the request to checks whether the package name is installed. Returns true if at least 1 package is installed

GetInstalledPackagesOptionValue ( ) : IEnumerable
GetPackageByFastpath ( string fastPath ) : PackageItem

Get the PackageItem object from the fast path

GetPackageByFilePath ( string filePath ) : PackageItem

Get a package object from the package manifest file

GetPackageByFilePath ( string filePath, string packageName ) : PackageItem

Get a package object from the package manifest file

GetPackageById ( PackageSource source, string name, NuGetRequest request, string requiredVersion = null, string minimumVersion = null, string maximumVersion = null, bool minInclusive = true, bool maxInclusive = true ) : IEnumerable
GetPackageById ( string name, NuGetRequest request, string requiredVersion = null, string minimumVersion = null, string maximumVersion = null, bool minInclusive = true, bool maxInclusive = true ) : IEnumerable

Get the package based on given package id

LocationCloseEnoughMatch ( string givenLocation, string knownLocation ) : bool
MakeFastPath ( PackageSource source, string id, string version ) : string

Encrypting a path containing package source location, id, version and source

MakeTagId ( PackageItem pkg ) : string
MinAndMaxVersionMatched ( Microsoft.PackageManagement.Provider.Utility.SemanticVersion packageVersion, string minimumVersion, string maximumVersion, bool minInclusive, bool maxInclusive ) : bool
RemovePackageSource ( string id ) : void

Unregister the package source

ResolvePackageSource ( string nameOrLocation ) : PackageSource
SearchForPackages ( PackageSource source, string name ) : IEnumerable

Search the entire repository for the packages

SearchForPackages ( string name ) : IEnumerable
TryParseFastPath ( string fastPath, string &source, string &id, string &version, string &sources ) : bool
ValidateSourceLocation ( string location ) : bool

Check if the package source location is valid

YieldPackage ( PackageItem pkg, string searchKey, string destinationPath = null ) : bool

Communicate to the PackageManagement platform about the package info

YieldPackages ( IEnumerable packageReferences, string searchKey ) : bool

Communicate to the PackageManagement platform about the package info

Method Details

NuGetRequest() protected method

Ctor required by the PackageManagement Platform
protected NuGetRequest ( ) : System
return System