IManagedTemplatePackageProvider Interface

Definition

The provider is responsible for managing IManagedTemplatePackages. Besides base functionality of ITemplatePackageProvider, it adds ability to install, update and uninstall template packages.

C#
public interface IManagedTemplatePackageProvider : Microsoft.TemplateEngine.Abstractions.TemplatePackage.ITemplatePackageProvider
Implements

Remarks

The IManagedTemplatePackageProvider keeps track of template packages managed by the provider. The actual installation is done by IInstaller implementations.

Properties

Factory

Gets ITemplatePackageProviderFactory that created the provider.

(Inherited from ITemplatePackageProvider)

Methods

GetAllTemplatePackagesAsync(CancellationToken)

Gets the list of template packages available for the provider.

(Inherited from ITemplatePackageProvider)
GetLatestVersionsAsync(IEnumerable<IManagedTemplatePackage>, CancellationToken)

Gets the latest version for the template packages.

InstallAsync(IEnumerable<InstallRequest>, CancellationToken)

Installs new IManagedTemplatePackage based on InstallRequest data. All IInstallers are considered via CanInstallAsync(InstallRequest, CancellationToken) and if only 1 IInstaller returns true. InstallAsync(InstallRequest, IManagedTemplatePackageProvider, CancellationToken) is executed and result is returned.

UninstallAsync(IEnumerable<IManagedTemplatePackage>, CancellationToken)

Uninstalls the template packages.

UpdateAsync(IEnumerable<UpdateRequest>, CancellationToken)

Updates the template packages given in updateRequests to specified version.

Events

TemplatePackagesChanged

Raised when template packages have been changed. Indicates that caller should refresh the list of template packages in use.

(Inherited from ITemplatePackageProvider)

Applies to

Proizvod Verzije
Template Engine 6.0.100, 7.0.100