C# Класс NugetForUnity.NugetPackageSource

Represents a NuGet Package Source (a "server").
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetSpecificPackage ( NugetPackageIdentifier package ) : NugetPackage

Gets a NugetPackage from the NuGet server that matches (or is in range of) the NugetPackageIdentifier given. If an exact match isn't found, it selects the next closest version available.

GetUpdates ( IEnumerable installedPackages, bool includePrerelease = false, bool includeAllVersions = false, string targetFrameworks = "", string versionContraints = "" ) : List

Queries the source with the given list of installed packages to get any updates that are available.

NugetPackageSource ( string name, string path ) : System.Collections.Generic

Initializes a new instance of the NugetPackageSource class.

Search ( string searchTerm = "", bool includeAllVersions = false, bool includePrerelease = false, int numberToGet = 15, int numberToSkip ) : List

Gets a list of NuGetPackages from this package source. This allows searching for partial IDs or even the empty string (the default) to list ALL packages. NOTE: See the functions and parameters defined here: https://www.nuget.org/api/v2/$metadata

Приватные методы

Метод Описание
GetLocalPackages ( string searchTerm = "", bool includeAllVersions = false, bool includePrerelease = false, int numberToGet = 15, int numberToSkip ) : List

Gets a list of all available packages from a local source (not a web server) that match the given filters.

GetLocalUpdates ( IEnumerable installedPackages, bool includePrerelease = false, bool includeAllVersions = false ) : List

Gets a list of available packages from a local source (not a web server) that are upgrades for the given list of installed packages.

GetPackagesFromUrl ( string url ) : List

Builds a list of NugetPackages from the XML returned from the HTTP GET request issued at the given URL. Note that NuGet uses an Atom-feed (XML Syndicaton) superset called OData. See here http://www.odata.org/documentation/odata-version-2-0/uri-conventions/

Описание методов

GetSpecificPackage() публичный Метод

Gets a NugetPackage from the NuGet server that matches (or is in range of) the NugetPackageIdentifier given. If an exact match isn't found, it selects the next closest version available.
public GetSpecificPackage ( NugetPackageIdentifier package ) : NugetPackage
package NugetPackageIdentifier The containing the ID and Version of the package to get.
Результат NugetPackage

GetUpdates() публичный Метод

Queries the source with the given list of installed packages to get any updates that are available.
public GetUpdates ( IEnumerable installedPackages, bool includePrerelease = false, bool includeAllVersions = false, string targetFrameworks = "", string versionContraints = "" ) : List
installedPackages IEnumerable The list of currently installed packages.
includePrerelease bool True to include prerelease packages (alpha, beta, etc).
includeAllVersions bool True to include older versions that are not the latest version.
targetFrameworks string The specific frameworks to target?
versionContraints string The version constraints?
Результат List

NugetPackageSource() публичный Метод

Initializes a new instance of the NugetPackageSource class.
public NugetPackageSource ( string name, string path ) : System.Collections.Generic
name string The name of the package source.
path string The path to the package source.
Результат System.Collections.Generic

Search() публичный Метод

Gets a list of NuGetPackages from this package source. This allows searching for partial IDs or even the empty string (the default) to list ALL packages. NOTE: See the functions and parameters defined here: https://www.nuget.org/api/v2/$metadata
public Search ( string searchTerm = "", bool includeAllVersions = false, bool includePrerelease = false, int numberToGet = 15, int numberToSkip ) : List
searchTerm string The search term to use to filter packages. Defaults to the empty string.
includeAllVersions bool True to include older versions that are not the latest version.
includePrerelease bool True to include prerelease packages (alpha, beta, etc).
numberToGet int The number of packages to fetch.
numberToSkip int The number of packages to skip before fetching.
Результат List