Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    TemplateGeneratorParameters Class

    Namespace: Stride.Core.Assets.Templates
    Assembly: Stride.Core.Assets.dll

    Parameters used by ITemplateGenerator<TParameters>

    System.Object → TemplateGeneratorParameters
    Derived from TemplateGeneratorParameters: PackageTemplateGeneratorParameters SessionTemplateGeneratorParameters

    public abstract class TemplateGeneratorParameters
    Name Description
    Constructors
    TemplateGeneratorParameters()
    TemplateGeneratorParameters(TemplateGeneratorParameters)
    Fields
    Tags

    Contains extra properties that can be consumed by template generators.

    Properties
    Description

    The actual template description.

    Id

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

    Logger

    Gets or sets the logger.

    Name

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

    Namespace

    Gets or sets the default namespace of this project.

    OutputDirectory

    Gets or sets the output directory.

    Unattended

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

    Methods
    GetTag<T>(PropertyKey<T>)

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

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

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

    Validate()

    Validates this instance (all fields must be setup)

    ValidateParameters()
    | Improve this Doc View Source

    Constructors


    TemplateGeneratorParameters()

    protected TemplateGeneratorParameters()

    TemplateGeneratorParameters(TemplateGeneratorParameters)

    protected TemplateGeneratorParameters(TemplateGeneratorParameters parameters)
    Parameters
    Type Name Description
    TemplateGeneratorParameters parameters
    | Improve this Doc View Source

    Fields


    Tags

    Contains extra properties that can be consumed by template generators.

    public PropertyContainer Tags
    Field Value
    Type Description
    PropertyContainer
    | Improve this Doc View Source

    Properties


    Description

    The actual template description.

    public TemplateDescription Description { get; set; }
    Property Value
    Type Description
    TemplateDescription

    Id

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

    public Guid Id { get; set; }
    Property Value
    Type Description
    System.Guid

    The ID


    Logger

    Gets or sets the logger.

    public LoggerResult Logger { get; set; }
    Property Value
    Type Description
    LoggerResult

    The logger.


    Name

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

    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    The name.


    Namespace

    Gets or sets the default namespace of this project.

    public string Namespace { get; set; }
    Property Value
    Type Description
    System.String

    The namespace.


    OutputDirectory

    Gets or sets the output directory.

    public UDirectory OutputDirectory { get; set; }
    Property Value
    Type Description
    Stride.Core.IO.UDirectory

    The output directory.


    Unattended

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

    public bool Unattended { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    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
    Type Name Description
    PropertyKey<T> key

    The property key for which to retrieve the value.

    Returns
    Type Description
    T

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

    Type Parameters
    Name Description
    T

    The generic type of the property key.

    Exceptions
    Type Condition
    System.Collections.Generic.KeyNotFoundException

    Tag not found in template generator parameters.


    HasTag<T>(PropertyKey<T>)

    public bool HasTag<T>(PropertyKey<T> key)
    Parameters
    Type Name Description
    PropertyKey<T> key
    Returns
    Type Description
    System.Boolean
    Type Parameters
    Name Description
    T

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

    public void SetTag<T>(PropertyKey<T> key, T value)
    Parameters
    Type Name Description
    PropertyKey<T> key
    T value
    Type Parameters
    Name Description
    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
    Type Name Description
    PropertyKey<T> key

    The property key for which to retrieve the value.

    Returns
    Type Description
    T

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

    Type Parameters
    Name Description
    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()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation