C# Class TcmDebugger.Mediators.WrappedCSharpMediator

WrappedCSharpMediator wraps around T:Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator in order to load template classes from local debug assemblies
Inheritance: IMediator
Exibir arquivo Open project: mvlasenko/TridionVSRazorExtension

Public Methods

Method Description
Configure ( MediatorElement configuration ) : void

Configures the specified configuration.

Initialize ( ) : void

Initializes the WrappedCSharpMediator by executing the static constructor

RunTemplateWrapper ( Engine engine, Package package, String templateUri, String className ) : void

Wraps around the original RunTemplate in order to load debug classes when required

The wrapper tries to load the specified class from available assemblies in the following order: 1) Assemblies configured as debug assemblies in the application configuration 2) Assemblies loaded in the application domain 3) Assembly with the same name as the template present in the application directory 4) Assembly stored in the Tridion database (default behavior of Tridion)

Transform ( Engine engine, Template template, Package package ) : void

Executes a Tridion template transformation

Private Methods

Method Description
AssemblyResolve ( Object sender, ResolveEventArgs args ) : Assembly

Allow for resolving of dependent assemblies in the path of configured debug assembly libraries

GetTemplate ( IEnumerable assemblies, String className ) : ITemplate

Obtain the I:Tridion.ContentManager.Templating.Assembly.ITemplate for the requested className from the specified assemblies

LoadAssembly ( String fileName ) : Assembly

Load the T:System.Reflection.Assembly specified by the filename

Additionally loads the assembly symbols (.pdb) if available

WrappedCSharpMediator ( ) : System

Initializes the WrappedCSharpMediator class.

Method Details

Configure() public method

Configures the specified configuration.
public Configure ( MediatorElement configuration ) : void
configuration MediatorElement The configuration.
return void

Initialize() public static method

Initializes the WrappedCSharpMediator by executing the static constructor
public static Initialize ( ) : void
return void

RunTemplateWrapper() public static method

Wraps around the original RunTemplate in order to load debug classes when required
The wrapper tries to load the specified class from available assemblies in the following order: 1) Assemblies configured as debug assemblies in the application configuration 2) Assemblies loaded in the application domain 3) Assembly with the same name as the template present in the application directory 4) Assembly stored in the Tridion database (default behavior of Tridion)
public static RunTemplateWrapper ( Engine engine, Package package, String templateUri, String className ) : void
engine Engine
package Package
templateUri String
className String Class to execute
return void

Transform() public method

Executes a Tridion template transformation
public Transform ( Engine engine, Template template, Package package ) : void
engine Engine
template Template
package Package
return void