forked from Sitefinity/mvc-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
144 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<GhostDoc> | ||
<IgnoreFilePatterns> | ||
<IgnoreFilePattern>*.min.js</IgnoreFilePattern> | ||
<IgnoreFilePattern>jquery*.js</IgnoreFilePattern> | ||
</IgnoreFilePatterns> | ||
</GhostDoc> |
21 changes: 21 additions & 0 deletions
21
CustomImageWidget/CustomImageWidget/App_Start/RazorGeneratorMvcStart.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Web; | ||
using System.Web.Mvc; | ||
using System.Web.WebPages; | ||
using RazorGenerator.Mvc; | ||
|
||
[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(CustomImageWidget.RazorGeneratorMvcStart), "Start")] | ||
|
||
namespace CustomImageWidget { | ||
public static class RazorGeneratorMvcStart { | ||
public static void Start() { | ||
var engine = new PrecompiledMvcEngine(typeof(RazorGeneratorMvcStart).Assembly) { | ||
UsePhysicalViewsIfNewer = HttpContext.Current.Request.IsLocal | ||
}; | ||
|
||
ViewEngines.Engines.Insert(0, engine); | ||
|
||
// StartPage lookups are done by WebPages. | ||
VirtualPathFactoryManager.RegisterVirtualPathFactory(engine); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.