C# Class RazorGenerator.Core.HostManager

Inheritance: IDisposable
Show file Open project: mvlasenko/TridionVSRazorExtension Class Usage Examples

Public Methods

Method Description
CreateHost ( string fullPath, string projectRelativePath, CodeDomProvider codeDomProvider, string vsNamespace ) : IRazorHost
CreateHost ( string fullPath, string projectRelativePath, string vsNamespace ) : IRazorHost
Dispose ( ) : void
HostManager ( string baseDirectory ) : System
HostManager ( string baseDirectory, bool loadExtensions, RazorRuntime defaultRuntime, string assemblyDirectory ) : System

Private Methods

Method Description
AddCatalogIfHostsDirectoryExists ( System.ComponentModel.Composition.Hosting.AggregateCatalog catalog, string directory ) : void
GetAssembly ( RazorRuntime runtime ) : Assembly
GetAssesmblyDirectory ( ) : string Attempts to locate where the RazorGenerator.Core assembly is being loaded from. This allows us to locate the v1 and v2 assemblies and the corresponding System.Web.* binaries Assembly.CodeBase points to the original location when the file is shadow copied, so we'll attempt to use that first.
GetAvailableHosts ( System.ComponentModel.Composition.Hosting.CompositionContainer container ) : IEnumerable
GetRazorCodeTransformer ( System.ComponentModel.Composition.Hosting.CompositionContainer container, string projectRelativePath, string hostName ) : IRazorCodeTransformer
GuessHost ( string projectRoot, string projectRelativePath, RazorRuntime &runtime ) : string
InitCompositionCatalog ( string baseDirectory, bool loadExtensions, RazorRuntime runtime ) : ComposablePartCatalog
IsMvcProject ( string projectRoot, RazorRuntime &razorRuntime ) : bool?
OnAssemblyResolve ( object sender, ResolveEventArgs eventArgs ) : Assembly

Method Details

CreateHost() public method

public CreateHost ( string fullPath, string projectRelativePath, CodeDomProvider codeDomProvider, string vsNamespace ) : IRazorHost
fullPath string
projectRelativePath string
codeDomProvider CodeDomProvider
vsNamespace string
return IRazorHost

CreateHost() public method

public CreateHost ( string fullPath, string projectRelativePath, string vsNamespace ) : IRazorHost
fullPath string
projectRelativePath string
vsNamespace string
return IRazorHost

Dispose() public method

public Dispose ( ) : void
return void

HostManager() public method

public HostManager ( string baseDirectory ) : System
baseDirectory string
return System

HostManager() public method

public HostManager ( string baseDirectory, bool loadExtensions, RazorRuntime defaultRuntime, string assemblyDirectory ) : System
baseDirectory string
loadExtensions bool
defaultRuntime RazorRuntime
assemblyDirectory string
return System