Click or drag to resize
HandlebarsViewEngine Class
An ASP.NET MVC ViewEngine that uses the Handlebars syntax for its view files.
Inheritance Hierarchy
SystemObject
  HandlebarsDotNet.MvcHandlebarsViewEngine

Namespace: HandlebarsDotNet.Mvc
Assembly: HandlebarsDotNet.Mvc (in HandlebarsDotNet.Mvc.dll) Version: 1.0.0-beta
Syntax
public class HandlebarsViewEngine : IViewEngine

The HandlebarsViewEngine type exposes the following members.

Constructors
  NameDescription
Public methodHandlebarsViewEngine
Initializes a new instance of the HandlebarsViewEngine class with DefaultPathsProvider as its path provider.
Public methodHandlebarsViewEngine(IPathsProvider)
Initializes a new instance of the HandlebarsViewEngine class.
Top
Methods
  NameDescription
Public methodClearCache
Clears the cache used by HandlebarsViewEngine.
Protected methodCreateView
Creates an IView instance that is ready to be rendered.
Public methodStatic memberExtractActionName
Gets the action name from the controller context.
Public methodStatic memberExtractAreaName
Gets the area name from the controller context.
Public methodStatic memberExtractControllerName
Gets the controller name from the controller context.
Protected methodFileExists
Checks for file existence.
Public methodFindPartialView
Finds the specified partial view by using the specified controller context.
Public methodFindView
Finds the specified view by using the specified controller context.
Protected methodGetCacheKey
Gets the cachekey for the specified path.
Public methodRegisterHelper(String, HandlebarsBlockHelper)
Registers a block helper in this view engine's global configuration.
Public methodCode exampleRegisterHelper(String, HandlebarsHelper)
Registers a helper in this view engine's global configuration.
Public methodRegisterMvcHelpers
Registers the builtin helpers that act a lot like their Razor/WebForms counterpart site-wide in the HandlebarsConfiguration.
Public methodRegisterSectionsHelpers
Registers the builtin helpers that act a lot like their Razor counterpart site-wide in the HandlebarsConfiguration.
Public methodRegisterTemplate
Registers a template in this view engine's global configuration.
Public methodReleaseView
Releases the specified view by using the specified controller context.
Top
Properties
  NameDescription
Public propertyCacheKeyPrefix
The prefix to use when creating the cache keys.
Public propertyHandlebarsConfiguration
A copy of this will be used when compiling the views. This is the place to provide site-wide helpers, block-helpers and templates.
Public propertyLogger
The logger used. The default is a NullLogger instance.
Public propertyPathsProvider
The paths provider used. The default is DefaultPathsProvider that mostly mimics the view files placements in the built-in MVC framework.
Public propertyViewExtension
The file extension the view files and partials must have in order for this ViewEngine to handle it. Default: ".hbs"
Public propertyViewsSlidingCacheTime
The length of time that compiled views are cached after last access. Set this to to disable caching. Default is 5 minutes.
Protected propertyVirtualPathProvider
The VirtualPathProvider to use. This is only to facilitate unit testing! The default is the registered VirtualPathProvider.
Top
See Also