Class PackageManagerBase
- Namespace
- ZeroInstall.Services.Native
- Assembly
- ZeroInstall.Services.dll
Base class for IPackageManager implementations using template methods.
public abstract class PackageManagerBase : IPackageManager
- Inheritance
-
PackageManagerBase
- Implements
- Derived
- Inherited Members
Remarks
This class is immutable and thread-safe.
Properties
DistributionName
The name of the Distributions this package manager provides packages for.
protected abstract string DistributionName { get; }
Property Value
Methods
GetImplementations(string)
Retrieves a set of specific native implementations for a package name.
protected abstract IEnumerable<ExternalImplementation> GetImplementations(string packageName)
Parameters
packageName
stringThe name of the package to look for.
Returns
Lookup(ImplementationSelection)
Looks up the specific ExternalImplementation an ImplementationSelection was based on.
public ExternalImplementation? Lookup(ImplementationSelection selection)
Parameters
selection
ImplementationSelectionThe implementation selection to look up.
Returns
- ExternalImplementation
The ExternalImplementation;
null
ifselection
does not refer to a package known to this package manager.
Query(PackageImplementation, params string[])
Queries the package manager for all ExternalImplementations that match a specific PackageImplementation definition.
public IEnumerable<ExternalImplementation> Query(PackageImplementation package, params string[] distributions)
Parameters
package
PackageImplementationThe definition of the package to look for.
distributions
string[]Specifies the distributions to check for matching packages. Leave empty to check in all available distributions.