Exemple #1
0
        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));
        }
Exemple #2
0
        /// <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));
        }
Exemple #3
0
 public override bool FileExists(string virtualPath)
 {
     return(EmbeddedViewPath.IsEmbeddedView(virtualPath) || (Previous != null && Previous.FileExists(virtualPath)));
 }