OpenTAP 9.25
API Reference
Public Member Functions | List of all members
OpenTap.Package.FilePackageRepository Class Reference

Implements a IPackageRepository that queries a local directory for OpenTAP packages. More...

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

Public Member Functions

 FilePackageRepository (string path)
 Constructs a FilePackageRepository for a directory More...
 
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 pid, 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...
 
override string ToString ()
 Creates a display friendly string of this.
 

Additional Inherited Members

- Properties inherited from OpenTap.Package.IPackageRepository
string Url [get]
 The url of the repository.
 

Detailed Description

Implements a IPackageRepository that queries a local directory for OpenTAP packages.

Constructor & Destructor Documentation

◆ FilePackageRepository()

OpenTap.Package.FilePackageRepository.FilePackageRepository ( string  path)
inline

Constructs a FilePackageRepository for a directory

Parameters
pathRelative or absolute path or URI to a directory or a file. If file, the repository will be the directory containing the file
Exceptions
NotSupportedExceptionPath is not a valid file package repository

Member Function Documentation

◆ CheckForUpdates()

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

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.

Implements OpenTap.Package.IPackageRepository.

◆ DownloadPackage()

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

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.

Implements OpenTap.Package.IPackageRepository.

◆ GetPackageNames()

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

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.

Implements OpenTap.Package.IPackageRepository.

◆ GetPackages()

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

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.

Implements OpenTap.Package.IPackageRepository.

◆ GetPackageVersions()

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

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.

Implements OpenTap.Package.IPackageRepository.

OpenTAP 9.25 API built Tue Aug 6 2024 07:49:25