using HandlebarsDotNet; namespace MfGames.Nitride.Handlebars.Configuration; /// /// Describes a block helper which can be registered. /// public abstract class HandlebarsBlockBase : IHandlebarsLoader { /// /// Gets the name of the helper, which is how it is called in the template. /// protected abstract string HelperName { get; } public void Register(IHandlebars handlebars) { HandlebarsBlockHelper blockHelper = this.Render; handlebars.RegisterHelper(this.HelperName, blockHelper); } /// /// Renders the helper to the template. /// protected abstract void Render( EncodedTextWriter output, BlockHelperOptions options, Context context, Arguments input); }