Class TemplateManager
Handle templates for creating Package, ProjectReference
public class TemplateManager
- Inheritance
-
TemplateManager
Methods
FindTemplateGenerator<TParameters>(TemplateDescription)
Finds a template generator supporting the specified template description
public static ITemplateGenerator<TParameters> FindTemplateGenerator<TParameters>(TemplateDescription description) where TParameters : TemplateGeneratorParameters
Parameters
description
TemplateDescriptionThe description.
Returns
- ITemplateGenerator<TParameters>
A template generator supporting the specified description or null if not found.
Type Parameters
TParameters
FindTemplateGenerator<TParameters>(TParameters)
Finds a template generator supporting the specified template description
public static ITemplateGenerator<TParameters> FindTemplateGenerator<TParameters>(TParameters parameters) where TParameters : TemplateGeneratorParameters
Parameters
parameters
TParametersThe parameters.
Returns
- ITemplateGenerator<TParameters>
A template generator supporting the specified description or null if not found.
Type Parameters
TParameters
FindTemplates(PackageSession)
Finds all template descriptions.
public static IEnumerable<TemplateDescription> FindTemplates(PackageSession session = null)
Parameters
session
PackageSession
Returns
- IEnumerable<TemplateDescription>
A sequence containing all registered template descriptions.
FindTemplates(TemplateScope, PackageSession)
Finds template descriptions that match the given scope.
public static IEnumerable<TemplateDescription> FindTemplates(TemplateScope scope, PackageSession session = null)
Parameters
scope
TemplateScopesession
PackageSession
Returns
- IEnumerable<TemplateDescription>
A sequence containing all registered template descriptions that match the given scope.
Register(ITemplateGenerator)
Registers the specified factory.
public static void Register(ITemplateGenerator generator)
Parameters
generator
ITemplateGeneratorThe factory.
Exceptions
- ArgumentNullException
factory
RegisterPackage(Package)
public static void RegisterPackage(Package package)
Parameters
package
Package
Unregister(ITemplateGenerator)
Unregisters the specified factory.
public static void Unregister(ITemplateGenerator generator)
Parameters
generator
ITemplateGeneratorThe factory.
Exceptions
- ArgumentNullException
factory