RazorEngine


RazorEngine

Overview

RazorEngine
RazorEngine.Compilation
RazorEngine.Compilation.CSharp
RazorEngine.Compilation.ImpromptuInterface
RazorEngine.Compilation.ImpromptuInterface.Build
RazorEngine.Compilation.ImpromptuInterface.Dynamic
RazorEngine.Compilation.ImpromptuInterface.InvokeExt
RazorEngine.Compilation.ImpromptuInterface.Optimization
RazorEngine.Compilation.Inspectors
RazorEngine.Compilation.ReferenceResolver
RazorEngine.Compilation.VisualBasic
RazorEngine.Configuration
RazorEngine.Configuration.Xml
RazorEngine.Roslyn
RazorEngine.Roslyn.CSharp
RazorEngine.Templating
RazorEngine.Templating.Parallel
RazorEngine.Text

Back to top RazorEngine Namespace

TypeDescription
AttributeValue

Razor Html Attribute value

CrossAppDomainObject

Enables access to objects across application domain boundaries. This type differs from MarshalByRefObject by ensuring that the service lifetime is managed deterministically by the consumer.

Encoding

Defines the possible values for encoding.

Engine

Provides quick access to the functionality of the RazorEngineService class.

Language

Defines the possible supported code languages.

PositionTagged<'T>

PositionTagged

Razor

Provides quick access to template functions.

Back to top RazorEngine.Compilation Namespace

TypeDescription
CompilationData

Provides (temporary) data about an compilation process.

CompilerServiceBase

Provides a base implementation of a compiler service.

CompilerServiceBuilder

Manages creation of ICompilerService instances.

CompilerServicesUtility

Provides service methods for compilation.

CrossAppDomainCleanUp

Helper class to cleanup locked files and folders after the current AppDomain has been unloaded. (Because of locking they can't be deleted while the current AppDomain is up, see https://github.com/Antaris/RazorEngine/issues/244)

DefaultCompilerServiceFactory

Provides a default implementation of a ICompilerServiceFactory.

DirectCompilerServiceBase

Provides a base implementation of a direct compiler service.

HasDynamicModelAttribute

Defines an attribute that marks the presence of a dynamic model in a template.

ICompilerService

Defines the required contract for implementing a compiler service.

ICompilerServiceFactory

Defines the required contract for implementing a compiler service factory.

RazorDynamicObject

Wraps a dynamic object for serialization of dynamic objects and anonymous type support. But this type will also make (static) types work which are not serializable.

RazorEngineHost

Defines the custom razor engine host.

TypeContext

Defines a type context that describes a template to compile.

Back to top RazorEngine.Compilation.CSharp Namespace

TypeDescription
CSharpCodeParser

Defines a code parser that supports the C# syntax.

CSharpDirectCompilerService

Defines a direct compiler service for the C# syntax.

CSharpRazorCodeGenerator

Defines a code generator that supports C# syntax.

CSharpRazorCodeLanguage

Provides a razor code language that supports the C# language.

Back to top RazorEngine.Compilation.ImpromptuInterface Namespace

TypeDescription
ActLikeCaster

Extends the ImpromptuForwarder class to allow implicit and explicit conversions to any interface type.

AliasAttribute

Alias to swap method/property/event call name invoked on original

IActLikeProxy

This interface can be used to access the original content of your emitted type;

Impromptu

Main API

InvokeArg<'T>

InvokeArg that makes it easier to Cast from any IDictionaryValue

InvokeArg

Use for Named arguments passed to InvokeMethods

InvokeContext

Object that stores a context with a target for dynamic invocation

InvokeMemberName

Name of Member with associated Generic parameterss

NonRecursiveInterfaceAttribute

Attribute on Inteface to stop proxy from recursively proxying other interfaces

StaticContext

Specific version of InvokeContext which declares a type to be used to invoke static methods.

String_OR_InvokeMemberName

String or InvokeMemberName

UseNamedArgumentAttribute

Attribute for Methods and Parameters on Custom Interfaces designed to be used with a dynamic implementation

Back to top RazorEngine.Compilation.ImpromptuInterface.Build Namespace

TypeDescription
ActLikeProxy

Base class of Emited ProxiesC:\Documents and Settings\jayt\My Documents\Visual Studio 2010\Projects\RazorEngine.Compilation.ImpromptuInterface\RazorEngine.Compilation.ImpromptuInterface\Optimization\

ActLikeProxyAttribute

Meta info describing proxy usage. Can be used to preload proxy.

ActLikeProxySerializationHelper

Support Deserializing the proxy since on separate runs of an executable

BuildProxy

Does most of the work buiding and caching proxies

EmitExtensions

Extension Methods that make emiting code easier and easier to read

IActLikeProxyInitialize

This interface can be used to define your own custom proxy if you preload it.

Remarks

Advanced usage only! This is required as well as ActLikeProxyAttribute

TypeHash

Type that Encompasses Hashing a group of Types in various ways

Back to top RazorEngine.Compilation.ImpromptuInterface.Dynamic Namespace

TypeDescription
IActLike

This interface can be used on your custom dynamic objects if you want impromptu interfaces without casting to object or using the static method syntax of ActLike. Also if you want to change the behavior for slightly for specific types as this will take precident when using the dynamic keyword or your specific type is known staticly.

IDynamicKnowLike

This interface can be used on your custom dynamic objects if you want to know the interface you are impromptu-ly implementing.

IForwarder

Get access to target of original proxy

ImpromptuForwarder

Proxies Calls allows subclasser to override do extra actions before or after base invocation

Remarks

This may not be as efficient as other proxies that can work on just static objects or just dynamic objects... Consider this when using.

ImpromptuLateLibraryType

Late bind types from libraries not not at compile type

ImpromptuObject

Dynamic Object that knows about the Impromtu Interface return types; Override Typical Dynamic Object methods, and use TypeForName to get the return type of an interface member.

Invocation

Storable representation of an invocation without the target

InvocationKind

Type of Invocation

ThisAction

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5, 'T6>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11, 'T12>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11, 'T12, 'T13>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11, 'T12, 'T13, 'T14>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11, 'T12, 'T13, 'T14, 'T15>

Special Delegate used to make impromptu object methods first parameter is this.

ThisAction<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16>

Special Delegate used to make impromptu object methods first parameter is this.

ThisDelegate

Extension method for Dealing with Special Delegate Type

ThisFunc<'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11, 'T12, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11, 'T12, 'T13, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11, 'T12, 'T13, 'T14, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

ThisFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8, 'T9, 'T10, 'T11, 'T12, 'T13, 'T14, 'T15, 'T16, 'TResult>

Special Delegate used to make impromptu object methods first parameter is this.

Back to top RazorEngine.Compilation.ImpromptuInterface.InvokeExt Namespace

TypeDescription
InvokeExt

Various extension methods for add

Back to top RazorEngine.Compilation.ImpromptuInterface.Optimization Namespace

TypeDescription
Util

Utility Class

Back to top RazorEngine.Compilation.Inspectors Namespace

TypeDescription
ICodeInspector

Defines the required contract for implementing a code inspector.

Back to top RazorEngine.Compilation.ReferenceResolver Namespace

TypeDescription
CompilerReference

Represents a reference for the compiler

IReferenceResolver

Tries to resolve the references for a given compilation option.

UseCurrentAssembliesReferenceResolver

Resolves the assemblies by using all currently loaded assemblies. See IReferenceResolver

Back to top RazorEngine.Compilation.VisualBasic Namespace

TypeDescription
VBCodeParser

Defines a code parser that supports the VB syntax.

VBDirectCompilerService

Defines a direct compiler service for the VB syntax.

VBRazorCodeGenerator

Defines a code generator that supports VB syntax.

VBRazorCodeLanguage

Provides a razor code language that supports the VB language.

Back to top RazorEngine.Configuration Namespace

TypeDescription
FluentTemplateServiceConfiguration

Defines a fluent template service configuration

IConfigurationBuilder

Defines the required contract for implementing a configuration builder.

ITemplateServiceConfiguration

Defines the required contract for implementing template service configuration.

RazorEngineConfigurationSection

Defines the main configuration section for the RazorEngine.

ReadOnlyTemplateServiceConfiguration

Provides a readonly view of a configuration, and safe-copies all references.

TemplateServiceConfiguration

Provides a default implementation of a template service configuration.

Back to top RazorEngine.Configuration.Xml Namespace

TypeDescription
NamespaceConfigurationElement

Defines a configuration of a namespace.

NamespaceConfigurationElementCollection

Defines a collection of NamespaceConfigurationElement instances.

TemplateServiceConfigurationElement

Defines a configuration of a template service.

TemplateServiceConfigurationElementCollection

Defines a collection of TemplateServiceConfigurationElement instances.

WrapperTemplateManager

This is a simple wrapper around an ITemplateResolver to provide an ITemplateManager service.

XmlTemplateServiceConfiguration

Represents a template service configuration that supports the xml configuration mechanism.

Back to top RazorEngine.Roslyn Namespace

TypeDescription
RoslynCompilerServiceFactory

Provides a implementation of ICompilerServiceFactory for the Roslyn implementation.

Back to top RazorEngine.Roslyn.CSharp Namespace

TypeDescription
CSharpRoslynCompilerService

A concrete ICompilerService implementation for C# by using the Roslyn compiler.

RoslynCompilerServiceBase

Base compiler service class for roslyn compilers

Back to top RazorEngine.Templating Namespace

TypeDescription
BaseTemplateKey

A base implementation for ITemplateKey. You only need to provide the ITemplateKey.GetUniqueKeyString implementation which depends on the ITemplateManager implementation.

DefaultAppDomainFactory

Provides a default implementation of an AppDomain factory.

DefaultCachingProvider

The default caching provider (See ICachingProvider). This implementation does a very simple in-memory caching. It can handle when the same template is used with multiple model-types.

DelegateTemplateManager

Provides an ITemplateManager that supports delegated template resolution.

DelegateTemplateResolver

Provides an ITemplateResolver that supports delegated template resolution.

DynamicViewBag

Defines a dynamic view bag.

EmbeddedResourceTemplateManager

A TemplateManager loading templates from embedded resources.

ExecuteContext

Defines a context for tracking template execution.

FullPathTemplateKey

A simple ITemplateKey implementation inheriting from BaseTemplateKey. This implementation assumes that the template-names are unique and returns the name as unique key. (So this implementation is used by DelegateTemplateManager and WrapperTemplateManager.

FullPathWithModifiedTimeTemplateKey

This implementation adds ModifiedTime property to FullPathTemplateKey

HtmlTemplateBase<'T>

Provides a base implementation of an html template with a model.

Remarks

This type does not currently serve a purpose, and the WriteAttribute* API has been migrated to the TemplateBase type. This type is not deprecated, as it may form the basis for a future template that supports MVC like @Html syntax.

IActivator

Defines the required contract for implementing an activator.

IAppDomainFactory

Defines the required contract for implementing an AppDomain factory.

ICachingProvider

This interface represents the caching layer.

ICompiledTemplate

Represents a compiled template.

IInternalTemplateService

A internal contract for the TemplateBase class.

IRazorEngineService

Defines the required contract for implementing a template service. The main API for running templates.

ITemplate

Defines the required contract for implementing a template.

ITemplate<'T>

Defines the required contract for implementing a template with a model.

ITemplateKey

With a template key a template can be resolved and loaded. Implementations of this interface are provided along with the ITemplateManager implementation. See BaseTemplateKey for a base implementation.

ITemplateManager

Defines the required contract for implementing a template-manager.

ITemplateResolver

Defines the required contract for implementing a template resolver.

ITemplateRunner<'TModel>

Defines the required contract for implementing a typed, runnable template reference.

ITemplateService

Defines the required contract for implementing a template service.

ITemplateSource

Represents a template source (ie the source code of a template).

InstanceContext

Defines contextual information for a template instance.

InvalidatingByModifiedTimeCachingProvider

An memory leaking invalidating caching provider (See ICachingProvider). This implementation does a very simple in-memory caching and allows you to release templates by trading with memory. File modification time is used to check if cached template is valid. WARNING: Use this caching provider only on AppDomains you recycle regularly, or to improve the debugging experience. Never use this in production without any recycle strategy.

InvalidatingCachingProvider

An memory leaking invalidating caching provider (See ICachingProvider). This implementation does a very simple in-memory caching and allows you to release templates by trading with memory. WARNING: Use this caching provider only on AppDomains you recycle regularly, or to improve the debugging experience. Never use this in production without any recycle strategy.

IsolatedRazorEngineService

Provides template parsing and compilation in an isolated application domain.

IsolatedTemplateService

Provides template parsing and compilation in an isolated application domain.

LoadedTemplateSource

A simple ITemplateSource implementation which represents an in-memory string.

NameOnlyTemplateKey

A simple ITemplateKey implementation inheriting from BaseTemplateKey. This implementation assumes that the template-names are unique and returns the name as unique key. (So this implementation is used by DelegateTemplateManager and WrapperTemplateManager.

RazorEngineCompilerError

Defines a compiler error.

RazorEngineService

Defines a template service and the main API for running templates. Implements the IRazorEngineService interface.

RazorEngineServiceExtensions

Extensions for the IRazorEngineService.

RequireNamespacesAttribute

Allows base templates to define require template imports when generating templates.

ResolvePathCheckModifiedTimeTemplateManager

A TemplateManager resolving remplates by path, given a list of folders to look into. Uses FullPathWithModifiedTimeTemplateKey to save template modification time.

ResolvePathTemplateManager

A TemplateManager resolving templates by path, given a list of folders to look into.

ResolveType

The type of a resolve action.

TemplateBase

Provides a base implementation of a template. NOTE: This class is not serializable to prevent subtle errors in user IActivator implementations which would break the sandbox. (because executed in the wrong AppDomain)

TemplateBase<'T>

Provides a base implementation of a template with a model.

TemplateCompilationException

Defines an exception that occurs during compilation of the template.

TemplateLoadingException

Happens when we could compile the template, but are unable to load the resulting assembly!

TemplateParsingException

Defines an exception that occurs during template parsing.

TemplateRunnerExtensions

Extensions for the ITemplateRunner`1.

TemplateService

Defines a template service.

TemplateWriter

Defines a template writer used for helper templates.

TypeLoader

Defines a type loader.

WatchingResolvePathTemplateManager

A ResolvePathTemplateManager which watches for changes in the filesytem and invalides the corresponding cache entries. WARNING: Use this only on AppDomains you recycle regularly, or to improve the debugging experience. Never use this in production without any recycle strategy.

Back to top RazorEngine.Templating.Parallel Namespace

TypeDescription
DefaultParallelQueryPlan<'T>

Represents a default parallel query plan.

Remarks

The DefaultParallelQueryPlan`1 uses the default ParallelQuery`1 result. The degree of parallelism by default is .

IParallelQueryPlan<'T>

Defines the required contract for implementing a parallel query plan.

Back to top RazorEngine.Text Namespace

TypeDescription
HtmlEncodedString

Represents a Html-encoded string.

HtmlEncodedStringFactory

Represents a factory that creates HtmlEncodedString instances.

IEncodedString

Defines the required contract for implementing an encoded string.

IEncodedStringFactory

Defines the required contract for implementing a factory for building encoded strings.

RawString

Represents an unencoded string.

RawStringFactory

Represents a factory that creates RawString instances.

Fork me on GitHub