IsolatedTemplateService
Defined in RazorEngine.dll.
Provides template parsing and compilation in an isolated application domain.
Constructors
Constructor | Description |
new()
Signature: unit -> unit
|
Initialises a new instance of IsolatedTemplateService |
new(language)
Signature: language:Language -> unit
|
Initialises a new instance of IsolatedTemplateService |
new(encoding)
Signature: encoding:Encoding -> unit
|
Initialises a new instance of IsolatedTemplateService |
new(appDomainFactory)
Signature: appDomainFactory:IAppDomainFactory -> unit
|
Initialises a new instance of IsolatedTemplateService |
new(appDomainFactory)
Signature: appDomainFactory:Func<AppDomain> -> unit
|
|
new(...)
Signature: (language:Language * encoding:Encoding * appDomainFactory:IAppDomainFactory) -> unit
|
Initialises a new instance of IsolatedTemplateService |
new(language, appDomainFactory)
Signature: (language:Language * appDomainFactory:Func<AppDomain>) -> unit
|
|
new(...)
Signature: (language:Language * encoding:Encoding * appDomainFactory:Func<AppDomain>) -> unit
|
|
new(encoding, appDomainFactory)
Signature: (encoding:Encoding * appDomainFactory:Func<AppDomain>) -> unit
|
Instance members
Instance member | Description |
AddNamespace(ns)
Signature: ns:string -> unit
Modifiers: abstract |
Adds a namespace that will be imported into the template. |
Compile(...)
Signature: (razorTemplate:string * modelType:Type * cacheName:string) -> unit
Modifiers: abstract |
Compiles the specified template. |
CreateTemplate(...)
Signature: (razorTemplate:string * templateType:Type * model:obj) -> ITemplate
Modifiers: abstract |
Creates an instance of ITemplate`1 from the specified string template. |
CreateTemplates(...)
Signature: (razorTemplates:IEnumerable<string> * templateTypes:IEnumerable<Type> * models:IEnumerable<obj> * parallel:bool) -> IEnumerable<ITemplate>
Modifiers: abstract |
|
CreateTemplateType(...)
Signature: (razorTemplate:string * modelType:Type) -> Type
Modifiers: abstract |
Creates a Type that can be used to instantiate an instance of a template. |
CreateTemplateTypes(...)
Signature: (razorTemplates:IEnumerable<string> * modelTypes:IEnumerable<Type> * parallel:bool) -> IEnumerable<Type>
Modifiers: abstract |
|
Dispose()
Signature: unit -> unit
Modifiers: abstract |
Releases resources used by this instance. |
GetTemplate(...)
Signature: (razorTemplate:string * model:obj * cacheName:string) -> ITemplate
Modifiers: abstract |
Gets an instance of the template using the cached compiled type, or compiles the template type if it does not exist in the cache. |
GetTemplates(...)
Signature: (razorTemplates:IEnumerable<string> * models:IEnumerable<obj> * cacheNames:IEnumerable<string> * parallel:bool) -> IEnumerable<ITemplate>
Modifiers: abstract |
|
HasTemplate(cacheName)
Signature: cacheName:string -> bool
Modifiers: abstract |
Returns whether or not a template by the specified name has been created already. |
Parse(...)
Signature: (razorTemplate:string * model:obj * viewBag:DynamicViewBag * cacheName:string) -> string
Modifiers: abstract |
Parses and returns the result of the specified string template. |
Parse(...)
Signature: (razorTemplate:string * model:obj * viewBag:DynamicViewBag * cacheName:string) -> string
Modifiers: abstract Type parameters: 'T |
Parses and returns the result of the specified string template. |
ParseMany(...)
Signature: (razorTemplates:IEnumerable<string> * models:IEnumerable<obj> * viewBags:IEnumerable<DynamicViewBag> * cacheNames:IEnumerable<string> * parallel:bool) -> IEnumerable<string>
Modifiers: abstract |
|
RemoveTemplate(cacheName)
Signature: cacheName:string -> bool
Modifiers: abstract |
Remove a template by the specified name from the cache. |
Resolve(cacheName, model)
Signature: (cacheName:string * model:obj) -> ITemplate
Modifiers: abstract |
Resolves the template with the specified name. |
Run(cacheName, model, viewBag)
Signature: (cacheName:string * model:obj * viewBag:DynamicViewBag) -> string
Modifiers: abstract |
Runs the template with the specified cacheName. |
Run(template, viewBag)
Signature: (template:ITemplate * viewBag:DynamicViewBag) -> string
Modifiers: abstract |
Runs the template with the specified name. |