コード例 #1
0
        /// <summary>
        /// if the requested file is not exist, verify if the file /Views/{operator}/{path} exist
        /// </summary>
        /// <param name="virtualPath"></param>
        /// <returns></returns>
        public override bool FileExists(string virtualPath)
        {
            bool isExist = Previous.FileExists(virtualPath);

            if (!isExist)
            {
                isExist = VirtualFileEx.GetPhysicalFilePath(virtualPath) != null;
            }
            return(isExist);
        }
コード例 #2
0
        public override CacheDependency GetCacheDependency(string virtualPath, IEnumerable virtualPathDependencies, DateTime utcStart)
        {
            bool isExist = Previous.FileExists(virtualPath);

            if (isExist)
            {
                return(Previous.GetCacheDependency(virtualPath, virtualPathDependencies, utcStart));
            }

            // multi domain - same file???
            string physicalFilePath = VirtualFileEx.GetPhysicalFilePath(virtualPath);

            if (!string.IsNullOrEmpty(physicalFilePath))
            {
                return(new CacheDependency(physicalFilePath));
            }

            return(null);
        }