Click or drag to resize

RazorEngineTLanguage Class

Defines a Razor engine instance for the specified TLanguage constraint.
Inheritance Hierarchy
SystemObject
  GSF.Web.ModelRazorEngineTLanguage

Namespace: GSF.Web.Model
Assembly: GSF.Web (in GSF.Web.dll) Version: 2.4.218-beta
Syntax
public class RazorEngine<TLanguage> : IRazorEngine, 
	IRazorEngineService, IDisposable
where TLanguage : new(), LanguageConstraint
View Source

Type Parameters

TLanguage
LanguageConstraint for the Razor engine.

The RazorEngineTLanguage type exposes the following members.

Constructors
 NameDescription
Public methodRazorEngineTLanguage Creates a new RazorEngineTLanguage instance.
Top
Properties
 NameDescription
Public propertyStatic memberDefault Gets default configured razor engine instance.
Public propertyEngineService Gets the IRazorEngineService instance used by the RazorEngineTLanguage.
Public propertyTemplatePath Gets the template path defined for this RazorEngineTLanguage.
Top
Methods
 NameDescription
Public methodAddTemplate Adds a given template to the template manager as dynamic template.
Public methodCompile(ITemplateKey, Type) Compiles the specified template and caches it.
Public methodCompile(String, Type) Compiles the specified template, by name, and caches it.
Public methodDispose Releases all the resources used by the RazorEngineTLanguage object.
Protected methodDispose(Boolean) Releases the unmanaged resources used by the RazorEngineTLanguage object and optionally releases the managed resources.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodStatic memberGetConfiguredEngine Gets a shared RazorEngineTLanguage instance created based on configured template path defined in the specified settingsCategory.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetKey Gets a given key from the ITemplateManager implementation. See GetKey(String, ResolveType, ITemplateKey).
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIsTemplateCachedChecks if a given template is already cached.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodPreCompile(ActionException) Kicks off a task to pre-compile Razor templates.
Public methodPreCompile(ActionException, String) Kicks off a task to pre-compile Razor templates.
Public methodPreCompile(Type, ActionException, String) Kicks off a task to pre-compile Razor templates.
Public methodRun Runs the given cached template.
Public methodRunCompile Runs the given cached template. When the cache does not contain the template it will be compiled and cached beforehand.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
See Also