ITemplateGenerator<TParameters> Interface
Namespace: Stride.Core.Assets.TemplatesAssembly: Stride.Core.Assets.dll
The interface to represent a template generator.
public interface ITemplateGenerator<in TParameters> : ITemplateGenerator where TParameters : TemplateGeneratorParameters
Type Parameters
Name | Description |
---|---|
TParameters | The type of parameters this generator uses. |
Name | Description | |
---|---|---|
Methods | ||
PrepareForRun(TParameters) | Prepares this generator with the specified parameters. |
|
Run(TParameters) | Runs the generator with the given parameter. |
Methods
PrepareForRun(TParameters)
Prepares this generator with the specified parameters.
Task<bool> PrepareForRun(TParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
TParameters | parameters | The parameters for the template generator. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A task completing when the preparation is finished, with the result |
Remarks
This method should be used to verify that the parameters are correct, and to ask user for additional information before running the template.
Run(TParameters)
Runs the generator with the given parameter.
bool Run(TParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
TParameters | parameters | The parameters for the template generator. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
This method should work in unattended mode and should not ask user for information anymore.