RazorEngine


IsolatedRazorEngineService

Defined in RazorEngine.dll.

Provides template parsing and compilation in an isolated application domain.

Instance members

Instance memberDescription
AddTemplate(key, templateSource)
Signature: (key:ITemplateKey * templateSource:ITemplateSource) -> unit
Modifiers: abstract

Adds a given template to the template manager as dynamic template.

Compile(key, modelType)
Signature: (key:ITemplateKey * modelType:Type) -> unit
Modifiers: abstract

Compiles the specified template and caches it.

Dispose()
Signature: unit -> unit
Modifiers: abstract

Releases resources used by this instance.

GetKey(name, resolveType, context)
Signature: (name:string * resolveType:ResolveType * context:ITemplateKey) -> ITemplateKey
Modifiers: abstract

Gets a given key from the ITemplateManager implementation. See ITemplateManager.GetKey.

Returns:

IsTemplateCached(key, modelType)
Signature: (key:ITemplateKey * modelType:Type) -> bool
Modifiers: abstract

Checks if a given template is already cached.

Returns:

Run(...)
Signature: (key:ITemplateKey * writer:TextWriter * modelType:Type * model:obj * viewBag:DynamicViewBag) -> unit
Modifiers: abstract

Runs the given cached template.

RunCompile(...)
Signature: (key:ITemplateKey * writer:TextWriter * modelType:Type * model:obj * viewBag:DynamicViewBag) -> unit
Modifiers: abstract

Runs the given cached template. When the cache does not contain the template it will be compiled and cached beforehand.

Static members

Static memberDescription
Create()
Signature: unit -> IRazorEngineService

Creates a new IRazorEngineService instance which executes the templates in a new AppDomain.

Returns:

Create(config)
Signature: config:IConfigCreator -> IRazorEngineService

Creates a new IRazorEngineService instance which executes the templates in a new AppDomain.

Returns:

Create(appDomainFactory)
Signature: appDomainFactory:IAppDomainFactory -> IRazorEngineService

Creates a new IRazorEngineService instance which executes the templates in a new AppDomain.

Returns:

Create(appDomainFactory)
Signature: appDomainFactory:Func<AppDomain> -> IRazorEngineService

Creates a new IRazorEngineService instance which executes the templates in a new AppDomain.

Returns:

Create(configCreator, appDomainFactory)
Signature: (configCreator:IConfigCreator * appDomainFactory:Func<AppDomain>) -> IRazorEngineService

Creates a new IRazorEngineService instance which executes the templates in a new AppDomain.

Returns:

Create(configCreator, appDomainFactory)
Signature: (configCreator:IConfigCreator * appDomainFactory:IAppDomainFactory) -> IRazorEngineService

Creates a new IRazorEngineService instance which executes the templates in a new AppDomain.

Returns:

Fork me on GitHub