C# Class Simplify.Web.Modules.Data.TemplateFactory

Web-site cacheable text templates loader
Inheritance: ITemplateFactory
显示文件 Open project: i4004/Simplify.Web Class Usage Examples

Public Methods

Method Description
Load ( string fileName ) : ITemplate

Load web-site template from a file

LoadAsync ( string filename ) : Task

Load web-site template from a file asynchronously.

Setup ( ) : void

Setups the template factory.

TemplateFactory ( IEnvironment environment, ILanguageManagerProvider languageManagerProvider, string defaultLanguage, bool templatesMemoryCache = false, bool loadTemplatesFromAssembly = false ) : System

Initializes a new instance of the TemplateFactory class.

Private Methods

Method Description
TryLoadExistingTemplate ( string filePath ) : ITemplate

Method Details

Load() public method

Load web-site template from a file
public Load ( string fileName ) : ITemplate
fileName string Template file name
return ITemplate

LoadAsync() public method

Load web-site template from a file asynchronously.
public LoadAsync ( string filename ) : Task
filename string The filename.
return Task

Setup() public method

Setups the template factory.
public Setup ( ) : void
return void

TemplateFactory() public method

Initializes a new instance of the TemplateFactory class.
public TemplateFactory ( IEnvironment environment, ILanguageManagerProvider languageManagerProvider, string defaultLanguage, bool templatesMemoryCache = false, bool loadTemplatesFromAssembly = false ) : System
environment IEnvironment The environment.
languageManagerProvider ILanguageManagerProvider The language manager provider.
defaultLanguage string The default language.
templatesMemoryCache bool if set to true them loaded templates will be cached in memory.
loadTemplatesFromAssembly bool if set to true then all templates will be loaded from assembly.
return System