Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    TemplateManager Class

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

    Handle templates for creating Package, ProjectReference

    System.Object → TemplateManager
    Derived from TemplateManager:

    public class TemplateManager
    Name Description
    Methods
    FindTemplateGenerator<TParameters>(TParameters)

    Finds a template generator supporting the specified template description

    FindTemplateGenerator<TParameters>(TemplateDescription)

    Finds a template generator supporting the specified template description

    FindTemplates(PackageSession)

    Finds all template descriptions.

    FindTemplates(TemplateScope, PackageSession)

    Finds template descriptions that match the given scope.

    Register(ITemplateGenerator)

    Registers the specified factory.

    RegisterPackage(Package)
    Unregister(ITemplateGenerator)

    Unregisters the specified factory.

    | Improve this Doc View Source

    Methods


    FindTemplateGenerator<TParameters>(TParameters)

    Finds a template generator supporting the specified template description

    public static ITemplateGenerator<TParameters> FindTemplateGenerator<TParameters>(TParameters parameters)
        where TParameters : TemplateGeneratorParameters
    Parameters
    Type Name Description
    TParameters parameters

    The parameters.

    Returns
    Type Description
    ITemplateGenerator<TParameters>

    A template generator supporting the specified description or null if not found.

    Type Parameters
    Name Description
    TParameters

    FindTemplateGenerator<TParameters>(TemplateDescription)

    Finds a template generator supporting the specified template description

    public static ITemplateGenerator<TParameters> FindTemplateGenerator<TParameters>(TemplateDescription description)
        where TParameters : TemplateGeneratorParameters
    Parameters
    Type Name Description
    TemplateDescription description

    The description.

    Returns
    Type Description
    ITemplateGenerator<TParameters>

    A template generator supporting the specified description or null if not found.

    Type Parameters
    Name Description
    TParameters

    FindTemplates(PackageSession)

    Finds all template descriptions.

    public static IEnumerable<TemplateDescription> FindTemplates(PackageSession session = null)
    Parameters
    Type Name Description
    PackageSession session
    Returns
    Type Description
    System.Collections.Generic.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
    Type Name Description
    TemplateScope scope
    PackageSession session
    Returns
    Type Description
    System.Collections.Generic.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
    Type Name Description
    ITemplateGenerator generator

    The factory.

    Exceptions
    Type Condition
    System.ArgumentNullException

    factory


    RegisterPackage(Package)

    public static void RegisterPackage(Package package)
    Parameters
    Type Name Description
    Package package

    Unregister(ITemplateGenerator)

    Unregisters the specified factory.

    public static void Unregister(ITemplateGenerator generator)
    Parameters
    Type Name Description
    ITemplateGenerator generator

    The factory.

    Exceptions
    Type Condition
    System.ArgumentNullException

    factory


    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