Table of Contents

Class TemplateGeneratorParameters

Namespace
Stride.Core.Assets.Templates
Assembly
Stride.Core.Assets.dll
public abstract class TemplateGeneratorParameters
Inheritance
TemplateGeneratorParameters
Derived

Constructors

TemplateGeneratorParameters()

protected TemplateGeneratorParameters()

TemplateGeneratorParameters(TemplateGeneratorParameters)

protected TemplateGeneratorParameters(TemplateGeneratorParameters parameters)

Parameters

parameters TemplateGeneratorParameters

Fields

Tags

Contains extra properties that can be consumed by template generators.

public PropertyContainer Tags

Field Value

PropertyContainer

Properties

Description

The actual template description.

public TemplateDescription Description { get; set; }

Property Value

TemplateDescription

Id

Gets or sets the project ID used to generate the template.

public Guid Id { get; set; }

Property Value

Guid

The ID

Logger

Gets or sets the logger.

public LoggerResult Logger { get; set; }

Property Value

LoggerResult

The logger.

Name

Gets or sets the project name used to generate the template.

public string Name { get; set; }

Property Value

string

The name.

Namespace

Gets or sets the default namespace of this project.

public string Namespace { get; set; }

Property Value

string

The namespace.

OutputDirectory

Gets or sets the output directory.

public UDirectory OutputDirectory { get; set; }

Property Value

UDirectory

The output directory.

Unattended

Specifies if the template generator should run in unattended mode (no UI).

public bool Unattended { get; set; }

Property Value

bool

Methods

GetTag<T>(PropertyKey<T>)

Gets the tag corresponding to the given property key. This will fail if key doesn't exist.

public T GetTag<T>(PropertyKey<T> key)

Parameters

key PropertyKey<T>

The property key for which to retrieve the value.

Returns

T

The value of the tag corresponding to the given property key.

Type Parameters

T

The generic type of the property key.

Exceptions

KeyNotFoundException

Tag not found in template generator parameters.

HasTag<T>(PropertyKey<T>)

public bool HasTag<T>(PropertyKey<T> key)

Parameters

key PropertyKey<T>

Returns

bool

Type Parameters

T

SetTag<T>(PropertyKey<T>, T)

public void SetTag<T>(PropertyKey<T> key, T value)

Parameters

key PropertyKey<T>
value T

Type Parameters

T

TryGetTag<T>(PropertyKey<T>)

Gets the tag corresponding to the given property key if available, otherwise returns default value.

public T TryGetTag<T>(PropertyKey<T> key)

Parameters

key PropertyKey<T>

The property key for which to retrieve the value.

Returns

T

The value of the tag corresponding to the given property key if available, the default value of the property key otherwise.

Type Parameters

T

The generic type of the property key.

Validate()

Validates this instance (all fields must be setup)

public void Validate()

ValidateParameters()

protected virtual void ValidateParameters()