OpenTAP 9.27
API Reference
Public Member Functions | Properties | List of all members
OpenTap.Package.IPackageRepository Interface Reference

A client interface for a package repository. Implementations include FilePackageRepository and HttpPackageRepository. More...

Inheritance diagram for OpenTap.Package.IPackageRepository:
OpenTap.Package.FilePackageRepository OpenTap.Package.HttpPackageRepository

Public Member Functions

void DownloadPackage (IPackageIdentifier package, string destination, CancellationToken cancellationToken)
 Downloads a package from this repository to a file. More...
 
string[] GetPackageNames (CancellationToken cancellationToken, params IPackageIdentifier[] compatibleWith)
 Get all names of packages. More...
 
PackageVersion[] GetPackageVersions (string packageName, CancellationToken cancellationToken, params IPackageIdentifier[] compatibleWith)
 Returns all package version information about a package. More...
 
PackageDef[] GetPackages (PackageSpecifier package, CancellationToken cancellationToken, params IPackageIdentifier[] compatibleWith)
 This returns the latest version of a package that matches a number of specified parameters. If multiple packages have that same version number they all will be returned. More...
 
PackageDef[] CheckForUpdates (IPackageIdentifier[] packages, CancellationToken cancellationToken)
 Returns a list of all packages that have an updated version. More...
 

Properties

string Url [get]
 The url of the repository.
 

Detailed Description

A client interface for a package repository. Implementations include FilePackageRepository and HttpPackageRepository.

Member Function Documentation

◆ CheckForUpdates()

PackageDef[] OpenTap.Package.IPackageRepository.CheckForUpdates ( IPackageIdentifier[]  packages,
CancellationToken  cancellationToken 
)

Returns a list of all packages that have an updated version.

Parameters
packages
cancellationTokenA cancellation token that can be used to cancel the download.
Returns
An array of package definitions PackageDef.

Implemented in OpenTap.Package.FilePackageRepository, and OpenTap.Package.HttpPackageRepository.

◆ DownloadPackage()

void OpenTap.Package.IPackageRepository.DownloadPackage ( IPackageIdentifier  package,
string  destination,
CancellationToken  cancellationToken 
)

Downloads a package from this repository to a file.

Parameters
packageThe package to download.
destinationThe destination path where the package should be stored.
cancellationTokenA cancellation token that can be used to cancel the download.

Implemented in OpenTap.Package.FilePackageRepository, and OpenTap.Package.HttpPackageRepository.

◆ GetPackageNames()

string[] OpenTap.Package.IPackageRepository.GetPackageNames ( CancellationToken  cancellationToken,
params IPackageIdentifier[]  compatibleWith 
)

Get all names of packages.

Parameters
cancellationTokenA cancellation token that can be used to cancel the download.
compatibleWithAny packages that the package to download must be compatible with.
Returns
An array of package names.

Implemented in OpenTap.Package.FilePackageRepository, and OpenTap.Package.HttpPackageRepository.

◆ GetPackages()

PackageDef[] OpenTap.Package.IPackageRepository.GetPackages ( PackageSpecifier  package,
CancellationToken  cancellationToken,
params IPackageIdentifier[]  compatibleWith 
)

This returns the latest version of a package that matches a number of specified parameters. If multiple packages have that same version number they all will be returned.

Parameters
packageA package identifier. If not specified, packages with any name will be returned.
cancellationTokenA cancellation token that can be used to cancel the download.
compatibleWithAny packages that the package to download must be compatible with.
Returns
An array of package definitions PackageDef.

Implemented in OpenTap.Package.HttpPackageRepository, and OpenTap.Package.FilePackageRepository.

◆ GetPackageVersions()

PackageVersion[] OpenTap.Package.IPackageRepository.GetPackageVersions ( string  packageName,
CancellationToken  cancellationToken,
params IPackageIdentifier[]  compatibleWith 
)

Returns all package version information about a package.

Parameters
packageNameThe name package to retrieve version info about.
cancellationTokenA cancellation token that can be used to cancel the download.
compatibleWithAny packages that the package to download must be compatible with.
Returns
An array of package versions.

Implemented in OpenTap.Package.FilePackageRepository, and OpenTap.Package.HttpPackageRepository.

OpenTAP 9.27 API built Wed Nov 27 2024 13:14:46