private static string DetermineVirtualPath(InheritedThemeFileResult resolveResult) { if (resolveResult.RelativePath.EndsWith(".cshtml", StringComparison.OrdinalIgnoreCase)) { // ASP.NET BuildManager requires the original path for razor views, // otherwise an exception is thrown return resolveResult.OriginalVirtualPath; } else { return resolveResult.ResultVirtualPath; } }
public InheritedVirtualThemeFile(InheritedThemeFileResult resolveResult) : base(DetermineVirtualPath(resolveResult)) { this._resolveResult = resolveResult; }