From a1f9cf36e0314fe75e2ebdac7146e145a60db384 Mon Sep 17 00:00:00 2001 From: Renaud Paquay Date: Thu, 10 Feb 2011 11:03:12 -0800 Subject: [PATCH] Adding comments --HG-- branch : dev --- .../WebFormsExtensionsVirtualPathProvider.cs | 9 +++++++++ .../Mvc/ViewEngines/Razor/IRazorCompilationEvents.cs | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/Orchard/FileSystems/Dependencies/WebFormsExtensionsVirtualPathProvider.cs b/src/Orchard/FileSystems/Dependencies/WebFormsExtensionsVirtualPathProvider.cs index b7799a0ea..5874da5df 100644 --- a/src/Orchard/FileSystems/Dependencies/WebFormsExtensionsVirtualPathProvider.cs +++ b/src/Orchard/FileSystems/Dependencies/WebFormsExtensionsVirtualPathProvider.cs @@ -9,6 +9,15 @@ using Orchard.FileSystems.VirtualPath; using Orchard.Logging; namespace Orchard.FileSystems.Dependencies { + /// + /// The purpose of this class is to insert assembly directives in WebForms views served + /// from ~/Modules and ~/Themes. Inserting these directives ensures that the WebForms + /// build provider will add proper assembly references when calling the compiler. + /// For example, if Module A depends on Module Bar and some other 3rd party DLL "Foo.dll", + /// we will insert the following assembly directives to the view file when server: + /// <%@ Assembly Src="~/Modules/Bar/Bar.csproj"%> + /// <%@ Assembly Name="Foo"%> + /// public class WebFormVirtualPathProvider : VirtualPathProvider, ICustomVirtualPathProvider { private readonly IDependenciesFolder _dependenciesFolder; private readonly IEnumerable _loaders; diff --git a/src/Orchard/Mvc/ViewEngines/Razor/IRazorCompilationEvents.cs b/src/Orchard/Mvc/ViewEngines/Razor/IRazorCompilationEvents.cs index 172f38bd5..44ece4e76 100644 --- a/src/Orchard/Mvc/ViewEngines/Razor/IRazorCompilationEvents.cs +++ b/src/Orchard/Mvc/ViewEngines/Razor/IRazorCompilationEvents.cs @@ -12,6 +12,15 @@ namespace Orchard.Mvc.ViewEngines.Razor { void CodeGenerationCompleted(RazorBuildProvider provider, CodeGenerationCompleteEventArgs e); } + /// + /// The purpose of this class is to notify the Razor View Engine of Module and Theme + /// dependencies when compiling Views, so that the Razor Views build provider will add proper + /// assembly references when calling the compiler. + /// For example, if Module A depends on Module Bar and some other 3rd party DLL "Foo.dll", + /// we will notify the Razor View Engine of the following dependencies: + /// * BuildManager.GetCompiledAssembly("~/Modules/Bar/Bar.csproj"); + /// * Assembly.Load("Foo"); + /// public class DefaultRazorCompilationEvents : IRazorCompilationEvents { private readonly IDependenciesFolder _dependenciesFolder; private readonly IBuildManager _buildManager;