public override CacheDependency GetCacheDependency(string virtualPath, IEnumerable virtualPathDependencies, DateTime utcStart) { if (EmbeddedViewPath.IsEmbeddedView(virtualPath)) { //TODO: We should actually create a cache dependency file here! return(null); } return(Previous.GetCacheDependency(virtualPath, virtualPathDependencies, utcStart)); }
/// <summary> /// Returns the view resource stream /// </summary> /// <param name="virtualPath"></param> /// <returns></returns> public override VirtualFile GetFile(string virtualPath) { if (EmbeddedViewPath.IsEmbeddedView(virtualPath)) { //to get the file we need to get var hash = EmbeddedViewPath.GetHashFromPath(virtualPath); if (!string.IsNullOrEmpty(hash)) { return(new EmbeddedViewVirtualFile(EmbeddedViewPath.GetViewResourceType(hash), virtualPath)); } } //let the base class handle this return(Previous.GetFile(virtualPath)); }
public override bool FileExists(string virtualPath) { return(EmbeddedViewPath.IsEmbeddedView(virtualPath) || (Previous != null && Previous.FileExists(virtualPath))); }